Revoke token
const options = {
method: 'DELETE',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({token: '<string>'})
};
fetch('https://api.example.com/v1/regions/global/auth/tokens', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/regions/global/auth/tokens"
payload := strings.NewReader("{\n \"token\": \"<string>\"\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}curl --request DELETE \
--url https://api.example.com/v1/regions/global/auth/tokens \
--header 'Content-Type: application/json' \
--data '
{
"token": "<string>"
}
'import requests
url = "https://api.example.com/v1/regions/global/auth/tokens"
payload = { "token": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.delete(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"revoked": true
}
}Authentication
Revoke token
Revoke an access or refresh token
DELETE
/
v1
/
regions
/
global
/
auth
/
tokens
Revoke token
const options = {
method: 'DELETE',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({token: '<string>'})
};
fetch('https://api.example.com/v1/regions/global/auth/tokens', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/regions/global/auth/tokens"
payload := strings.NewReader("{\n \"token\": \"<string>\"\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}curl --request DELETE \
--url https://api.example.com/v1/regions/global/auth/tokens \
--header 'Content-Type: application/json' \
--data '
{
"token": "<string>"
}
'import requests
url = "https://api.example.com/v1/regions/global/auth/tokens"
payload = { "token": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.delete(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"revoked": true
}
}Was this page helpful?