メインコンテンツまでスキップ

POST /v1/oauth/token

scope

認証不要(クライアント認証)

リクエストパラメーター

名前位置必須説明
grant_typeボディenum(client_credentialsauthorization_coderefresh_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