POST /v1/oauth/token
scope
認証不要(クライアント認証)
リクエストパラメーター
| 名前 | 位置 | 型 | 必須 | 説明 |
|---|---|---|---|---|
grant_type | ボディ | enum(client_credentials | authorization_code | refresh_token) |
client_id | ボディ | string | 必須 | |
client_secret | ボディ | string | 任意 | |
scope | ボディ | string | 任意 | |
code | ボディ | string | 任意 | authorization_code grant |
redirect_uri | ボディ | string | 任意 | |
code_verifier | ボディ | string | 任意 | PKCE(authorization_code grant) |
refresh_token | ボディ | string | 任意 | refresh_token grant |
レスポンスの例
{
"access_token": "string",
"token_type": "Bearer",
"expires_in": 600,
"scope": "read_items read_users",
"refresh_token": "string"
}
解説
アクセストークンを発行します(client_credentials ほか)。要求 scope はクライアントの許可範囲内に限られます。
エラーレスポンスの例
{
"error": {
"code": "insufficient_scope",
"message": "requires scope 'read_orders'",
"request_id": "req_01H..."
}
}
返しうるエラー: 400 / 401