Authorize (device)

POST {{authPath}}/{{envID}}/as/device_authorization

The POST /{{envID}}/as/device_authorization endpoint initiates a device authorization operation on applications that specify DEVICE_CODE as the grantTypes property value. The POST request's parameters and their values are Form Serialized by adding the parameter names and values to the entity body of the HTTP request and specifying the Content-Type: application/x-www-form-urlencoded request header.

Note: The verification_uri and verification_uri_complete properties in the response include the identifier /go in the URL. This ID is the value of the devicePathId set on the application. For more information about application configuration for device authorization grants, see Create Application (OIDC Device Authorization Grant).

PropertyTypeRequired?
client_idStringRequired
scopeStringOptional

See the Device authentication grant data model for full property descriptions.

ParameterDescription
client_idThe application's UUID.
scopePermissions that determine the resources that the application can access. This parameter is not required, but it is needed to specify accessible resources.

Request Params

KeyDatatypeRequiredDescription
client_idstringThe application's UUID.
scopestringPermissions that determine the resources that the application can access.

Request Body

[{"name"=>"client_id", "value"=>"{{deviceAppID}}", "datatype"=>"string"}, {"name"=>"scope", "value"=>"openid", "datatype"=>"string"}]

RESPONSES

status: OK

{"device_code":"031887ee-2328-49a7-a2cc-83ff491e10f8","user_code":"BVKV-2GZ2","verification_uri":"https://auth.pingone.com/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/device/go","verification_uri_complete":"https://auth.pingone.com/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/device/go?user_code=BVKV-2GZ2","expires_in":600,"interval":5}