Revoke API token
curl --request POST \
--url https://b2b-api-sandbox.easyonramp.com/api/v1/auth/tokens/{jti}/revoke \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "compromised"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({reason: 'compromised'})
};
fetch('https://b2b-api-sandbox.easyonramp.com/api/v1/auth/tokens/{jti}/revoke', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://b2b-api-sandbox.easyonramp.com/api/v1/auth/tokens/{jti}/revoke"
payload = { "reason": "compromised" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://b2b-api-sandbox.easyonramp.com/api/v1/auth/tokens/{jti}/revoke"
payload := strings.NewReader("{\n \"reason\": \"compromised\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}{
"id": "550e8400-e29b-41d4-a716-446655440000"
}Auth
Revoke API token
Immediately invalidate a JWT by its token id (jti). Use this to end a token before its grace-period expiry, or after a security incident. During normal rotation, the previous token expires automatically after the configured grace period.
POST
/
api
/
v1
/
auth
/
tokens
/
{jti}
/
revoke
Revoke API token
curl --request POST \
--url https://b2b-api-sandbox.easyonramp.com/api/v1/auth/tokens/{jti}/revoke \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "compromised"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({reason: 'compromised'})
};
fetch('https://b2b-api-sandbox.easyonramp.com/api/v1/auth/tokens/{jti}/revoke', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://b2b-api-sandbox.easyonramp.com/api/v1/auth/tokens/{jti}/revoke"
payload = { "reason": "compromised" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://b2b-api-sandbox.easyonramp.com/api/v1/auth/tokens/{jti}/revoke"
payload := strings.NewReader("{\n \"reason\": \"compromised\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}{
"id": "550e8400-e29b-41d4-a716-446655440000"
}Authorizations
Bearer JWT issued to your business account during onboarding
Path Parameters
Body
application/json
Example:
"compromised"
Response
200 - application/json
Revoked token jti
Example:
"550e8400-e29b-41d4-a716-446655440000"