Revoke an access token
curl --request POST \
--url https://api.kodelabs.com/oauth2/v1/revoke \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'token=<string>' \
--data client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer \
--data 'client_assertion=<string>'const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({
token: '<string>',
client_assertion_type: 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer',
client_assertion: '<string>'
})
};
fetch('https://api.kodelabs.com/oauth2/v1/revoke', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.kodelabs.com/oauth2/v1/revoke"
payload = {
"token": "<string>",
"client_assertion_type": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
"client_assertion": "<string>"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)$headers=@{}
$headers.Add("Content-Type", "application/x-www-form-urlencoded")
$response = Invoke-WebRequest -Uri 'https://api.kodelabs.com/oauth2/v1/revoke' -Method POST -Headers $headers -ContentType 'application/x-www-form-urlencoded' -Body 'token=%3Cstring%3E&client_assertion_type=urn%3Aietf%3Aparams%3Aoauth%3Aclient-assertion-type%3Ajwt-bearer&client_assertion=%3Cstring%3E'Authentication
Revoke an access token
Invalidates an access token before it expires.
POST
https://api.kodelabs.com/oauth2/v1
/
revoke
Revoke an access token
curl --request POST \
--url https://api.kodelabs.com/oauth2/v1/revoke \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'token=<string>' \
--data client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer \
--data 'client_assertion=<string>'const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({
token: '<string>',
client_assertion_type: 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer',
client_assertion: '<string>'
})
};
fetch('https://api.kodelabs.com/oauth2/v1/revoke', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.kodelabs.com/oauth2/v1/revoke"
payload = {
"token": "<string>",
"client_assertion_type": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
"client_assertion": "<string>"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)$headers=@{}
$headers.Add("Content-Type", "application/x-www-form-urlencoded")
$response = Invoke-WebRequest -Uri 'https://api.kodelabs.com/oauth2/v1/revoke' -Method POST -Headers $headers -ContentType 'application/x-www-form-urlencoded' -Body 'token=%3Cstring%3E&client_assertion_type=urn%3Aietf%3Aparams%3Aoauth%3Aclient-assertion-type%3Ajwt-bearer&client_assertion=%3Cstring%3E'Body
application/x-www-form-urlencoded
Response
Token revoked.
Was this page helpful?

