本文へスキップ

トークンを交換​

POST
/oauth/token

authorization_code と refresh_token の両方に対応します。authorization_code では client_id が必須です。refresh_token では client_id は任意ですが、指定する場合はそのリフレッシュトークンに紐づくクライアントと一致している必要があります。

リクエストボディ​

application/x-www-form-urlencoded
object
有効な値"authorization_code""refresh_token"

Required for authorization_code. Optional for refresh_token; if provided, it must match the client bound to the refresh token.

フォーマット"uuid"

Required when grant_type=authorization_code.

Required when grant_type=authorization_code. Must exactly match the application's registered redirect URI.

フォーマット"uri"

Required when grant_type=authorization_code.

Required when grant_type=refresh_token.

レスポンス​

OAuth tokens

application/json
JSON
{
  
"access_token": "string",
  
"token_type": "Bearer",
  
"refresh_token": "string",
  
"expires_in": 0
}

Playground​

ボディ

サンプル​