| Interface Dimension Authorization | Default Authorization | This API is granted by default, so you don't need to apply for interface dimension authorization separately for your authorization account. Please refer to Authorization Methods. |
|---|
| Region | Entry Point |
|---|---|
| China Region | https://openapi.orionstar.com |
| Europe Region | https://global-openapi.orionstar.com |
| USA Region | https://us-openapi.orionstar.com |
| Japan Region | https://jp-openapi.orionstar.com |
| HTTP URL Path | /v1/auth/get_token |
|---|---|
| HTTP Method | GET |
| Parameter | Type | Required | Description |
|---|---|---|---|
| appid | string | Yes | Appid issued by OrionStar |
| secret | string | Yes | Secret issued by OrionStar |
| grant_type | string | Yes | Fixed constant string client_credential |
curl --location 'https://global-openapi.orionstar.com/v1/auth/get_token?appid=test_appid&secret=test_secret&grant_type=client_credential'
| Parameter | Type | Description |
|---|---|---|
| code | int | Error code. 0 means success, non-zero means failure, Please refer to Error Codes. |
| msg | string | Error description. When there is a failure, a specific error description will be provided. |
| req_id | string | Log tracking ID. When encountering problems that require assistance from OrionStar, please provide this tracking ID value. |
| data | object | Business data object, see below for details Response Body Data Object. |
| Parameter | Type | Description |
|---|---|---|
| access_token | string | access_token |
| expire_in | int | Validity period of access_token, usually 2 hours, specific validity period subject to the returned value. Unit is in seconds. |
{ "code": 0, "msg": "", "data": { "access_token": "test_access_token", "expire_in": 7200 } }