Authentication API
Request Description
Request Headers
| Parameter Name | Chinese Name | Required | Example Value | Description |
|---|---|---|---|---|
| Authorization | Authentication Info | Required | Basic UnFCMkhKdNOWk9xWA== | Use client_id and client_secret for Base64-encoded authentication, format is base64(client_id:client_secret) |
| Content-Type | Data Type | Required | application/x-www-form-urlencoded | Submit parameters using form data |
Request Parameters
| Parameter Name | Chinese Name | Required | Type | Description |
|---|---|---|---|---|
| grant_type | Grant Type | Yes | String | Fixed value client_credentials |
Request Example
bash
POST https://{your_domain}/api/v2/tenant/token
Authorization: Basic UnFCMkhKdGt6bFU...aT0NObkk4NlNOWk9xWA==
Content-Type: application/x-www-form-urlencoded
grant_type=client_credentialsResponse Example
Success Example
json
{
"access_token": "e665e923-9904",
"token_type": "bearer",
"expires_in": 1719,
"scope": "all",
"id_token": "eyJraWMSIs.eyJQwWVzQOrwNYo.ELddR0yVUQXgupYWNtS"
}Token Expired or Invalid Error Example
HTTP Status: 400
json
{
"error": "invalid_token",
"error_description": "Invalid access"
}Response Parameters
| Parameter Name | Chinese Name | Type | Description |
|---|---|---|---|
| access_token | API Access Token | String | This parameter must be provided for all subsequent interface access |
| token_type | Token Type | String | Default is bearer |
| expires_in | Expiration Time | int | Unit is seconds, default 1800s |
| scope | Authorization Scope | String | Default is all |