Obtains an access token for accessing a resource server by using a specified application as the client identity.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
eiam:GenerateOauthToken |
none |
*Application
|
None | None |
Request syntax
POST HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The instance ID. |
idaas_ue2jvisn35ea5lmthk267xxxxx |
| ApplicationId |
string |
Yes |
The application ID. |
app_mkv7rgt4d7i4u7zqtzev2mxxxx |
| ScopeValues |
array |
Yes |
The permission scope. |
|
|
string |
No |
The permission value. |
User:Read:ALL |
|
| Audience |
string |
Yes |
The audience identifier of the resource server. |
https://example.com |
| GrantType |
string |
No |
The grant type. Valid values:
|
client_credentials |
| SubjectToken |
string |
No |
The subject token. |
subject001 |
| SubjectTokenType |
string |
No |
The subject token type. Valid values:
|
urn:ietf:params:oauth:token-type:access_token |
| RequestedTokenType |
string |
No |
The requested token type. Valid values:
|
urn:ietf:params:oauth:token-type:access_token |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response. |
||
| RequestId |
string |
The request ID. |
0441BD79-92F3-53AA-8657-F8CE4XXXXXXX |
| TokenResponse |
object |
The token response. |
|
| TokenType |
string |
The token type. Currently, only Bearer is supported. |
Bearer |
| AccessToken |
string |
The access token. |
eyJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJlaWFtIn0.signature |
| ExpiresIn |
integer |
The validity period, in seconds. |
1200 |
| ExpiresAt |
integer |
The expiration time, in UNIX timestamp format, in seconds. |
1770186372 |
| IssuedTokenType |
string |
The issued token type. |
standard |
Examples
Success response
JSON format
{
"RequestId": "0441BD79-92F3-53AA-8657-F8CE4XXXXXXX",
"TokenResponse": {
"TokenType": "Bearer",
"AccessToken": "eyJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJlaWFtIn0.signature",
"ExpiresIn": 1200,
"ExpiresAt": 1770186372,
"IssuedTokenType": "standard"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.