*
Generates an OAuth2-compliant token for a client and returns it. The client credentials (clientId and clientSecret) must be passed in the Authorization header using Basic Authentication.
POST /clients/oauth/token
Operation id: ClientService_GetOAuth2Token
Description
This method adheres to the OAuth2 standard and provides a response containing the access token, expiration time, token type, and scope, along with additional authentication details.
Note: This method does not require prior authorization as it is responsible for creating and returning the token itself.
HTTP Mapping:
- POST: /clients/oauth/token
Security:
- Requires Basic Authentication in the Authorization header.
@return OAuth2TokenResponse containing the generated access token and related metadata.
Tags: ClientService
Security
- BasicAuth
Responses
200 — A successful response.
Content type: application/json
default — An unexpected error response.
Content type: application/json
Request body
Required: Yes
application/json
Schema
{
"type": "object",
"properties": {}
}
Response models
200 — A successful response.
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
access_token | string | No | |
expires_in | string (int64) | No | |
token_type | string | No | Defines the tokenType. As per OAuth 2.0 specification, the value is "Bearer" for access tokens. |
{
"type": "object",
"properties": {
"access_token": {
"type": "string"
},
"expires_in": {
"type": "string",
"format": "int64"
},
"token_type": {
"type": "string",
"description": "Defines the tokenType. As per OAuth 2.0 specification, the value is \"Bearer\" for access tokens."
}
}
}
default — An unexpected error response.
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
code | integer (int32) | No | |
message | string | No | |
details | array | No |
{
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"type": "object",
"properties": {
"@type": {
"type": "string"
}
}
}
}
}
}