The Chat ID
Now we are missing the chat ID to successfully set up the forwarding. There are a few ways to find out this ID, but we recommend this one: Open the chat with your new bot and click “Start”. Send a message to the bot. Then call https://api.telegram.org/botTOKEN/getUpdates
. Instead of TOKEN, of course, you put the token for your bot that you received from BotFather. In your return, you will see the chat id. It is after the value "id"
, not after "update_id"
.
{
"ok":true,
"result":[
{
"update_id":583557485,
"message":{
"message_id":3,
"from":{
"id":1687380549,
"is_bot":false,
"first_name":"Jana",
"last_name":"L",
"language_code":"de"
},
"chat":{
"id":1687380549,
"first_name":"Jana",
"last_name":"L”",
"type":"private"
},
"date":1615446212,
"text":"Hello again"
}
}
]
}
In one of our test runs, we had to send our bot a second message to get an output other than {"ok":true, "result":}
. Perhaps a little more patience would have done the trick though! In all other cases, the output worked immediately after sending the first message.
19 Comments. Leave new
I followed all of the above steps, which seemed to be successfully set up, but I’m not seeing any of my incoming SMSs going to Telegram
Hi Darius,
let’s see! I just tried this again and it works for me so let me suggest you look at these points:
Do you receive your SMS in your Inbound Journal?
Can you please make sure the values for your bot token and the chat ID are correct for the bot you created?
If both of these are true, do let me know and we’ll try to figure it out.
what should i put in {sender} and{text}
Hi there, just leave it as it is. These are variables which get automatically replaced by Telegram.
Hello! When I created a WebHook it shows an error – just a red rectangle above. What is the issue?
Hi, thanks for bringing this to our attention!
We looked into it and you should now see an actual error text – sorry for the confusion!
Please try again and you should see what the issue is.
Feel free to contact us again if there are more questions coming up 🙂
Hello,
It’s not clear where the SMS has to be sent to be converted to a telegram message.
To my own phone? To a special number?
Hi, yes, this tutorial is specifically for forwarding incoming SMS in our Inbound System to Telegram, so SMS would have to be sent to the number you bought. You can find more information on our Inbound Service here: https://www.seven.io/en/products/inbound-sms/
Hope this helps.
So i can send the sms to the telegram account with different phone number with my sms number?
Hi, you can send an SMS to your inbound number with us and this will be forwarded to the telegram account. The SMS will include the number that has texted your inbound number in the form of “SMS from 012345678910” for example. So you can send from any number as long as you send it to your inbound number with us.
Hope this helps.
I want to create a chatbot, and when an user start it, all the sms will go to specific chat id, how i can do that? thanks
Hi, let me clarify: Are you looking for a chatbot in Telegram that people can send messages to and then you can reply to each individual chat via SMS?
Sms forward in telegram
Hi, so sorry for the late reply – do you have a question about our post?
how to call to get the id
Do you mean the chat id? Just follow the steps described in this blogpost under “The chatbot”
I m not able to get chat id. https://api.telegram.org/botTOKEN/getUpdates
After putting TOKEN id in place of token in above mentioned link then it showing {“ok”:true,”result”:[]}
I tried with 3 new bots what should I do now to get chat id ?
Hi, have you tried sending a couple of messages to your bot and then try it again?
Good Information for this article