Ativar bot com token
curl --request POST \
--url https://api.notifique.dev/v1/telegram/instances/{instanceId}/bot-token \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"botToken": "123456:ABC-DEF"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({botToken: '123456:ABC-DEF'})
};
fetch('https://api.notifique.dev/v1/telegram/instances/{instanceId}/bot-token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.notifique.dev/v1/telegram/instances/{instanceId}/bot-token"
payload = { "botToken": "123456:ABC-DEF" }
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://api.notifique.dev/v1/telegram/instances/{instanceId}/bot-token"
payload := strings.NewReader("{\n \"botToken\": \"123456:ABC-DEF\"\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))
}{
"success": true,
"data": {
"id": "inst_abc",
"status": "ACTIVE"
}
}{
"success": false,
"error": "Bad Request",
"code": "VALIDATION_ERROR",
"message": "Campo inválido ou ausente."
}{
"success": false,
"error": "Bad Request",
"code": "VALIDATION_ERROR",
"message": "Campo inválido ou ausente."
}{
"success": false,
"error": "Bad Request",
"code": "VALIDATION_ERROR",
"message": "Campo inválido ou ausente."
}Instâncias
Ativar bot com token
Ativa instância BOT pendente com o token do BotFather. Escopo: telegram:instances:create.
POST
/
v1
/
telegram
/
instances
/
{instanceId}
/
bot-token
Ativar bot com token
curl --request POST \
--url https://api.notifique.dev/v1/telegram/instances/{instanceId}/bot-token \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"botToken": "123456:ABC-DEF"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({botToken: '123456:ABC-DEF'})
};
fetch('https://api.notifique.dev/v1/telegram/instances/{instanceId}/bot-token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.notifique.dev/v1/telegram/instances/{instanceId}/bot-token"
payload = { "botToken": "123456:ABC-DEF" }
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://api.notifique.dev/v1/telegram/instances/{instanceId}/bot-token"
payload := strings.NewReader("{\n \"botToken\": \"123456:ABC-DEF\"\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))
}{
"success": true,
"data": {
"id": "inst_abc",
"status": "ACTIVE"
}
}{
"success": false,
"error": "Bad Request",
"code": "VALIDATION_ERROR",
"message": "Campo inválido ou ausente."
}{
"success": false,
"error": "Bad Request",
"code": "VALIDATION_ERROR",
"message": "Campo inválido ou ausente."
}{
"success": false,
"error": "Bad Request",
"code": "VALIDATION_ERROR",
"message": "Campo inválido ou ausente."
}Autorizações
ntfTgBearerAuthntfTgApiKeyHeader
Authorization: Bearer sk_live_xxxxx
Parâmetros de caminho
Exemplo:
"inst_abc"
Corpo
application/json
Esta página foi útil?

