Verify or approve a device authorization request.
curl --request POST \ --url https://auth.example.com/api/devices/verify \ --header 'Content-Type: application/json' \ --cookie authrim_session=<authrim_session> \ --data '{ "user_code": "WDJB-MJHT", "approve": true }'A code requested before the user last withdrew the client’s consent cannot be approved: 400 consent_withdrawn, and the device has to start again. Consent state that cannot be read returns 503 temporarily_unavailable and leaves the code pending. The per-IP user code rate limit fails closed: without a working rate limiter, or when the device code store cannot answer, the code is not read and the response is 503 temporarily_unavailable.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”object
The user code as shown on the device. Any case is accepted, and the hyphens and spaces between the groups are optional. Only the form is checked (4 to 16 letters and digits once the separators are removed): the tenant’s settings may have changed since the code was issued, so whether the code exists is decided by the code store, and a code that does not exist counts against the per-IP failed-attempt limit.
Example
{ "user_code": "WDJB-MJHT", "approve": true}Responses
Section titled “ Responses ”Successful JSON response.
object
Example
{ "success": true, "message": "Device authorized successfully"}OAuth error response.
object
Example generated
{ "error": "example", "error_description": "example"}OAuth error response.
object
Example generated
{ "error": "example", "error_description": "example"}OAuth error response.
object
Example generated
{ "error": "example", "error_description": "example"}OAuth error response.
object
Example generated
{ "error": "example", "error_description": "example"}OAuth error response.
object
Example generated
{ "error": "example", "error_description": "example"}