/oauth/token
Relative path: /oauth/token
Request body
Display Schema instead of an Example or vice-versa
Type |
Required |
Example |
Schema |
|---|---|---|---|
application/x-www-form-urlencoded |
No |
{
"grant_type": "password",
"username": "string",
"password": "string",
"refresh_token": "string"
} |
{
"$ref": "oauth_token_body",
"grant_type": {
"type": "string",
"description": "Value MUST be set to password or refresh_token as per RFC.",
"enum": [
"password",
"refresh_token"
]
},
"username": {
"type": "string",
"description": "Value MUST be set when granting password"
},
"password": {
"type": "string",
"description": "Value MUST be set when granting password",
"format": "password"
},
"refresh_token": {
"type": "string",
"description": "Value MUST be set when granting refresh_token"
}
} |
Responses
Display Schema instead of an Example or vice-versa
Code |
Description |
Example |
Schema |
|---|---|---|---|
200 |
Authorisation token (Bearer) |
{
"access_token": "string",
"refresh_token": "string",
"token_type": "Bearer",
"expires_in": 0
} |
{
"$ref": "Token",
"access_token": {
"type": "string",
"description": "The access token value"
},
"refresh_token": {
"type": "string",
"description": "The refresh token value"
},
"token_type": {
"type": "string",
"description": "Type of the token is set to 'Bearer'",
"enum": [
"Bearer"
]
},
"expires_in": {
"type": "integer",
"description": "The lifetime in seconds of the access token",
"format": "int32"
}
} |
default |
An unexpected error response. |
null |
[] |
202 |
Response took too long and the request was cached. |
null |
[] |