Нужно отправить тело запроса: указав token, client_id и client_secret
const token = "Your Token" // Bearer токен
var details = {
'token': token,
'client_id': 'Your clientId',
'client_secret': 'Your clientSecret'
};
var formBody = [];
for (var property in details) {
var encodedKey = encodeURIComponent(property);
var encodedValue = encodeURIComponent(details[property]);
formBody.push(encodedKey + "=" + encodedValue);
}
formBody = formBody.join("&");
const json = fetch('https://discord.com/api/v8/oauth2/token/revoke', {
method: 'POST',
headers: {
'Authorization': "Bearer " + token,
'Content-Type': 'application/x-www-form-urlencoded'
},
body: formBody
})