Revogar token
curl --request POST \
--url https://api.notifique.dev/oauth/revoke \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data token=rt_opaque_xyz \
--data token_type_hint=refresh_tokenconst options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({token: 'rt_opaque_xyz', token_type_hint: 'refresh_token'})
};
fetch('https://api.notifique.dev/oauth/revoke', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.notifique.dev/oauth/revoke"
payload = {
"token": "rt_opaque_xyz",
"token_type_hint": "refresh_token"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.notifique.dev/oauth/revoke"
payload := strings.NewReader("token=rt_opaque_xyz&token_type_hint=refresh_token")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true
}OAuth
Revogar token
Invalida refresh token (e o grant associado). Clientes confidenciais autenticam com client_secret_basic.
POST
/
oauth
/
revoke
Revogar token
curl --request POST \
--url https://api.notifique.dev/oauth/revoke \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data token=rt_opaque_xyz \
--data token_type_hint=refresh_tokenconst options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({token: 'rt_opaque_xyz', token_type_hint: 'refresh_token'})
};
fetch('https://api.notifique.dev/oauth/revoke', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.notifique.dev/oauth/revoke"
payload = {
"token": "rt_opaque_xyz",
"token_type_hint": "refresh_token"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.notifique.dev/oauth/revoke"
payload := strings.NewReader("token=rt_opaque_xyz&token_type_hint=refresh_token")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true
}Corpo
application/x-www-form-urlencoded
Resposta
200 - application/json
Token revogado (resposta vazia ou 200).
Resposta JSON vazia (sucesso sem payload).
Exemplo:
true
Esta página foi útil?

