Atualizar OAuth app
curl --request PATCH \
--url https://api.notifique.dev/v1/oauth/apps/{id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "Meu SaaS v2",
"allowedScopes": [
"email:send",
"whatsapp:send"
]
}
'const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Meu SaaS v2', allowedScopes: ['email:send', 'whatsapp:send']})
};
fetch('https://api.notifique.dev/v1/oauth/apps/{id}', 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}"
payload = {
"name": "Meu SaaS v2",
"allowedScopes": ["email:send", "whatsapp:send"]
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.notifique.dev/v1/oauth/apps/{id}"
payload := strings.NewReader("{\n \"name\": \"Meu SaaS v2\",\n \"allowedScopes\": [\n \"email:send\",\n \"whatsapp:send\"\n ]\n}")
req, _ := http.NewRequest("PATCH", 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))
}{
"success": true,
"data": {
"id": "cloauthapp_01H...",
"name": "Meu SaaS v2"
}
}
OAuth
Atualizar OAuth app
Altera nome, redirect URIs ou escopos padrão. Escopo oauth_apps:manage.
PATCH
/
v1
/
oauth
/
apps
/
{id}
Atualizar OAuth app
curl --request PATCH \
--url https://api.notifique.dev/v1/oauth/apps/{id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "Meu SaaS v2",
"allowedScopes": [
"email:send",
"whatsapp:send"
]
}
'const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Meu SaaS v2', allowedScopes: ['email:send', 'whatsapp:send']})
};
fetch('https://api.notifique.dev/v1/oauth/apps/{id}', 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}"
payload = {
"name": "Meu SaaS v2",
"allowedScopes": ["email:send", "whatsapp:send"]
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.notifique.dev/v1/oauth/apps/{id}"
payload := strings.NewReader("{\n \"name\": \"Meu SaaS v2\",\n \"allowedScopes\": [\n \"email:send\",\n \"whatsapp:send\"\n ]\n}")
req, _ := http.NewRequest("PATCH", 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))
}{
"success": true,
"data": {
"id": "cloauthapp_01H...",
"name": "Meu SaaS v2"
}
}
Esta página foi útil?

