Generates a device code.
Try it now
Test
RAM authorization
Request syntax
POST /v2/{instanceId}/{applicationId}/oauth2/device/code HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| instanceId |
string |
Yes |
The instance ID. |
idaas_ue2jvisn35ea5lmthk267xxxxx |
| applicationId |
string |
Yes |
The application ID. |
app_mkv7rgt4d7i4u7zqtzev2mxxxx |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| scope |
string |
No |
The authorization scope. |
xxx |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| device_code |
string |
The device code. |
xxxxx |
| user_code |
string |
The user authorization code. |
xxxxx |
| verification_uri |
string |
The verification URI. |
https://example.com/authorize/device |
| verification_uri_complete |
string |
The complete verification URI. |
https://example.com/authorize/device?user_code= xxxx |
| expires_in |
integer |
The remaining validity period of the device code. Unit: seconds. |
1200 |
| expires_at |
integer |
The time when the token expires. This value is a UNIX timestamp representing the number of seconds that have elapsed since January 1, 1970, 00:00:00 UTC. |
1653288641 |
| interval |
integer |
The timeout period of the request token. Unit: seconds. |
5 |
Examples
Success response
JSON format
{
"device_code": "xxxxx",
"user_code": "xxxxx",
"verification_uri": "https://example.com/authorize/device",
"verification_uri_complete": "https://example.com/authorize/device?user_code=\nxxxx",
"expires_in": 1200,
"expires_at": 1653288641,
"interval": 5
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.