トークンの取り消し
トークンの取り消し
アクセストークンまたは更新トークンをPOST /oauth2/revoke
エンドポイントに送信することにより、アクセストークンをいつでも取り消すことができます。
cURL
curl -X POST https://api.box.com/oauth2/revoke \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'client_id=[CLIENT_ID]' \
-d 'client_secret=[CLIENT_SECRET]' \
-d 'token=[ACCESS_TOKEN]'
Python
oauth.revoke()
Node
client.revokeTokens("<TOKEN>")
.then(() => {
// the client's access token have been revoked
});