Перейти до вмісту

Authorization

Маркер доступу

Request

Headers
Content-Typestringrequired
Example:application/json
Bodyapplication/json
client_idstringrequired

Ідентифікатор API ідентифікує учасника

client_secretstringrequired

Ключ API автентифікує ідентифікатор клієнта. Щоб викликати API MoreLogin, вам потрібно буде обміняти свій ідентифікатор API та ключ API на токен доступу. Зберігайте цей секрет у безпеці.

grant_typestringrequired

Назва пакета — обов’язкова, лише якщо не вказано appVersionId

Example:"client_credentials"
POST
/oauth2/token
curl -i -X POST \
  /oauth2/token \
  -H 'Content-Type: application/json' \
  -d '{
    "client_id": 1672940217990530,
    "client_secret": "client_secret",
    "grant_type": "client_credentials"
  }'

Responses

Headers
any
Bodyapplication/json
codeintegerrequired
msgnullrequired
dataobjectrequired
requestIdstringrequired
Response
{ "code": 0, "msg": null, "data": { "scope": "cloudphone", "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxNjU4MjYwNzYyNjA3OTU2IiwibmFtZSI6InpodXp1YmluNTU155qE5Zui6ZifIiwiZXhwIjoxNzY2ODkxNDY4LCJpYXQiOjE3NjY4ODc4Njh9.CJ_h-EQTG440qL-zSPcAockuw9PmBfyllyGZd0cmF0Q\n", "token_type": "Bearer", "expires_in": 3600, "client_metadata": {} }, "requestId": "1d4f3ea968664593860b94b35d4ebf5e" }