OAuth
アクセストークンを発行する
client_credentials、authorization_code、refresh_token を 3600 秒有効なトークンに交換します。
ボディ
application/x-www-form-urlencoded, application/json
grant_typestring必須交換するグラント:
client_credentials、authorization_code、またはrefresh_token使用できる値:
client_credentialsauthorization_coderefresh_tokenclient_idstring必須クライアントアプリケーションの ID
client_secretstring機密クライアントのシークレット(
client_secret_post)。またはAuthorization: Basicヘッダー(client_secret_basic)で渡し、両方は使えません。パブリッククライアントでは不要ですscopestring要求するスコープ。スペース区切り。省略するとグラントのすべて
workspace_idstringトークンが操作する Workspace。
client_credentialsでアプリケーションが複数を持つ場合は必須、1 つの場合は任意ですcodestringauthorization_code:リダイレクト先で受け取ったコードcode_verifierstringauthorization_code:PKCE ベリファイア(RFC 7636)redirect_uristringauthorization_code:認可時と同じリダイレクト先refresh_tokenstringrefresh_token:リフレッシュトークン(1 回限り)
レスポンス
200application/json
アクセストークン。refresh_token は offline_access が許可された場合のみ含まれます。
access_tokenstring必須不透明なアクセストークン
token_typestring必須常に
Bearer使用できる値:
Bearerexpires_innumber必須有効期間(秒)
scopestring必須許可されたスコープ。スペース区切り
refresh_tokenstringoffline_accessが許可された場合のauthorization_codeとrefresh_tokenのみ。1 回限りで、交換のたびに更新されます
400
invalid_request、invalid_grant、unsupported_grant_type、invalid_scope、unauthorized_client。
401
invalid_client:未知のクライアント、シークレットの誤りまたは欠落、または失効したアプリケーション。