Rotacionar client secret
curl --request POST \
--url https://api.notifique.dev/v1/oauth/apps/{id}/rotate-secretconst options = {method: 'POST'};
fetch('https://api.notifique.dev/v1/oauth/apps/{id}/rotate-secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.notifique.dev/v1/oauth/apps/{id}/rotate-secret"
response = requests.post(url)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.notifique.dev/v1/oauth/apps/{id}/rotate-secret"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true,
"data": {
"id": "cloauthapp_01H...",
"clientId": "ntf_oauth_cl_abc123",
"clientSecret": "ntf_oauth_cs_new_shown_once..."
}
}{
"success": false,
"error": "Unauthorized",
"message": "Invalid API key",
"code": "UNAUTHORIZED"
}{
"success": false,
"error": "Forbidden",
"message": "Missing scope webhooks:manage",
"code": "FORBIDDEN"
}{
"success": false,
"error": "Not Found",
"message": "Webhook not found",
"code": "NOT_FOUND"
}OAuth
Rotacionar client secret
Gera novo clientSecret (exibido uma vez). Escopo oauth_apps:manage.
POST
/
v1
/
oauth
/
apps
/
{id}
/
rotate-secret
Rotacionar client secret
curl --request POST \
--url https://api.notifique.dev/v1/oauth/apps/{id}/rotate-secretconst options = {method: 'POST'};
fetch('https://api.notifique.dev/v1/oauth/apps/{id}/rotate-secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.notifique.dev/v1/oauth/apps/{id}/rotate-secret"
response = requests.post(url)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.notifique.dev/v1/oauth/apps/{id}/rotate-secret"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true,
"data": {
"id": "cloauthapp_01H...",
"clientId": "ntf_oauth_cl_abc123",
"clientSecret": "ntf_oauth_cs_new_shown_once..."
}
}{
"success": false,
"error": "Unauthorized",
"message": "Invalid API key",
"code": "UNAUTHORIZED"
}{
"success": false,
"error": "Forbidden",
"message": "Missing scope webhooks:manage",
"code": "FORBIDDEN"
}{
"success": false,
"error": "Not Found",
"message": "Webhook not found",
"code": "NOT_FOUND"
}Esta página foi útil?

