Prepare Telegram Channel
curl --request POST \
--url https://alerts-api.dial.to/v2/channel/telegram/prepare \
--header 'Authorization: Bearer <token>' \
--header 'X-Dialect-Client-Key: <x-dialect-client-key>'import requests
url = "https://alerts-api.dial.to/v2/channel/telegram/prepare"
headers = {
"X-Dialect-Client-Key": "<x-dialect-client-key>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Dialect-Client-Key': '<x-dialect-client-key>',
Authorization: 'Bearer <token>'
}
};
fetch('https://alerts-api.dial.to/v2/channel/telegram/prepare', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://alerts-api.dial.to/v2/channel/telegram/prepare",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"X-Dialect-Client-Key: <x-dialect-client-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://alerts-api.dial.to/v2/channel/telegram/prepare"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-Dialect-Client-Key", "<x-dialect-client-key>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://alerts-api.dial.to/v2/channel/telegram/prepare")
.header("X-Dialect-Client-Key", "<x-dialect-client-key>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://alerts-api.dial.to/v2/channel/telegram/prepare")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Dialect-Client-Key"] = '<x-dialect-client-key>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"value": "<string>",
"verified": true,
"subscribed": true,
"verification": {
"link": "<string>"
},
"subscribedApps": [
{
"id": "255d6163-7e25-43e9-a188-c2f8d0980a4a",
"name": "Dialect",
"icon": "https://dialect-file-storage.s3.us-west-2.amazonaws.com/avatars/dialect-logo.png"
}
]
}{
"error": "<string>"
}Manage Channels
Prepare Telegram Channel
Prepare telegram channel for a subscriber
POST
/
v2
/
channel
/
telegram
/
prepare
Prepare Telegram Channel
curl --request POST \
--url https://alerts-api.dial.to/v2/channel/telegram/prepare \
--header 'Authorization: Bearer <token>' \
--header 'X-Dialect-Client-Key: <x-dialect-client-key>'import requests
url = "https://alerts-api.dial.to/v2/channel/telegram/prepare"
headers = {
"X-Dialect-Client-Key": "<x-dialect-client-key>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Dialect-Client-Key': '<x-dialect-client-key>',
Authorization: 'Bearer <token>'
}
};
fetch('https://alerts-api.dial.to/v2/channel/telegram/prepare', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://alerts-api.dial.to/v2/channel/telegram/prepare",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"X-Dialect-Client-Key: <x-dialect-client-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://alerts-api.dial.to/v2/channel/telegram/prepare"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-Dialect-Client-Key", "<x-dialect-client-key>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://alerts-api.dial.to/v2/channel/telegram/prepare")
.header("X-Dialect-Client-Key", "<x-dialect-client-key>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://alerts-api.dial.to/v2/channel/telegram/prepare")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Dialect-Client-Key"] = '<x-dialect-client-key>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"value": "<string>",
"verified": true,
"subscribed": true,
"verification": {
"link": "<string>"
},
"subscribedApps": [
{
"id": "255d6163-7e25-43e9-a188-c2f8d0980a4a",
"name": "Dialect",
"icon": "https://dialect-file-storage.s3.us-west-2.amazonaws.com/avatars/dialect-logo.png"
}
]
}{
"error": "<string>"
}Authorizations
Bearer token authentication for subscriber calls
Headers
Client Key used to uniquely identify the client
Example:
"dk_gyh2eqzfkc4mhp5eiahnndkz"
Was this page helpful?
⌘I