Skip to content

Begin an OAuth device authorization for an A2A client

POST
/v1/oauth/device_authorization
curl --request POST \
--url https://api.infiniteaudience.ai/v1/oauth/device_authorization \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data client_id=example \
--data client_secret=example \
--data resource=https://example.com \
--data scope=example

Public and client-authenticated (RFC 8628). Returns a browser verification URL, one-time user code, secret device code, expiry, and polling interval. The request must use the A2A resource. Delegated scopes are limited to discovery and optional creator.

object
client_id
required
string
client_secret
string
resource
required
string format: uri
scope

Space-delimited discovery and optional creator; defaults to discovery.

string
Examplegenerated
client_id=example&client_secret=example&resource=https%3A%2F%2Fexample.com&scope=example

Device authorization details.

Media typeapplication/json
object
device_code
required
string
user_code
required
string
verification_uri
required
string format: uri
verification_uri_complete
required
string format: uri
expires_in
required
integer
interval
required
integer
Example
{
"user_code": "ABCD-EFGH",
"expires_in": 600,
"interval": 5
}

RFC 6749-shaped OAuth protocol error — error is a fixed machine-readable code and error_description is a human-readable detail. Deliberately NOT this API’s usual {error, code, message} shape — this is the RFC’s own error contract, used only by /v1/oauth/authorize, /v1/oauth/device_authorization, /v1/oauth/token, and /v1/oauth/revoke.

Media typeapplication/json

RFC 6749 §5.2 / §4.1.2.1 error body — see the OAuthError response component.

object
error
required
string
Allowed values: invalid_request invalid_client invalid_client_metadata invalid_grant invalid_scope invalid_target invalid_token unsupported_response_type unsupported_grant_type authorization_pending slow_down access_denied expired_token server_error
error_description
required
string
Example
{
"error": "invalid_request"
}

RFC 6749-shaped OAuth protocol error — error is a fixed machine-readable code and error_description is a human-readable detail. Deliberately NOT this API’s usual {error, code, message} shape — this is the RFC’s own error contract, used only by /v1/oauth/authorize, /v1/oauth/device_authorization, /v1/oauth/token, and /v1/oauth/revoke.

Media typeapplication/json

RFC 6749 §5.2 / §4.1.2.1 error body — see the OAuthError response component.

object
error
required
string
Allowed values: invalid_request invalid_client invalid_client_metadata invalid_grant invalid_scope invalid_target invalid_token unsupported_response_type unsupported_grant_type authorization_pending slow_down access_denied expired_token server_error
error_description
required
string
Example
{
"error": "invalid_request"
}

RFC 6749-shaped OAuth protocol error — error is a fixed machine-readable code and error_description is a human-readable detail. Deliberately NOT this API’s usual {error, code, message} shape — this is the RFC’s own error contract, used only by /v1/oauth/authorize, /v1/oauth/device_authorization, /v1/oauth/token, and /v1/oauth/revoke.

Media typeapplication/json

RFC 6749 §5.2 / §4.1.2.1 error body — see the OAuthError response component.

object
error
required
string
Allowed values: invalid_request invalid_client invalid_client_metadata invalid_grant invalid_scope invalid_target invalid_token unsupported_response_type unsupported_grant_type authorization_pending slow_down access_denied expired_token server_error
error_description
required
string
Example
{
"error": "invalid_request"
}