Invalidating token
const accessToken = 'aYsxMIy3XguB9YORh2GzAL8E60MsVvXbG8IHxNFooSo'
const tokenUrl = 'http://api-sandbox.edgetag.io/v1/oauth-app/client/revoke'
const body = new URLSearchParams({
token: accessToken,
token_type_hint: 'access_token',
})
const response = await fetch(tokenUrl.toString(), {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
Authorization: `Basic ${btoa(clientId + ':' + clientSecret)}`,
},
body
})curl --request POST \
--url http://api-sandbox.edgetag.io/v1/oauth-app/client/revoke \
--header 'Authorization: Basic ZDAyNzJjNDItN2VjYy00ODk5LWExYTctMDgwMWE4YTlkYTJmOmQwMjcyYzQyLTdlY2MtNDg5OS1hMWE3LTA4MDFhOGE5ZGEyZg==' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data token=aYsxMIy3XguB9YORh2GzAL8E60MsVvXbG8IHxNFooSo \
--data token_type_hint=access_tokenLast updated
Was this helpful?

