This API is used to request access authorization and obtain an access token so that the app can interact with the Huawei game server within the validity period of the token.
Before calling the API, you need to obtain the client ID and client key used to generate an access token. For details, please refer to Creating an API Client.
https://connect-api.cloud.huawei.com/api/oauth2/v1/token
Parameter | Mandatory (M)/Optional (O) | Type | Description |
grant_type | M | String | Access grant type. This parameter has a fixed value of client_credentials. |
client_id | M | String | Client ID, that is, the client ID generated in Creating an API Client. |
client_secret | M | String | Client key, that is, the key generated in Creating an API Client. |
Parameter | Mandatory (M)/Optional (O) | Type | Description |
access_token | M | String | Access token, which follows Authorization: Bearer in the request header sent from the client to the Huawei game server. |
expires_in | M | long | Expiration timestamp of the access token. |
Type | Example |
Request |
|
Response |
|