All Apps and Add-ons

Telegram Alert Action: Where do you get a "chat id"?

hgehrts_splunk
Splunk Employee
Splunk Employee

Hi
I found the BotFather to create a bot in telegram. But how do I get a chat id?
BR
Henning

0 Karma

trangtriqc
New Member

I am having the same problem but I don't know how to get chat id of a channel. Anyone can help me?

0 Karma

ragedsparrow
SplunkTrust
SplunkTrust

Howdy! I wanted to follow up on this. Here is the process:

Personally, I use Channels instead of chat groups, I tend to like it more.

Would it have been more helpful if this information had been included in the README or some sort of support documentation? I think I just referenced the Telegram documentation, however if it'd be more helpful to include topics like this, kind of like a "hot shot" topic list, then I can add it.

htidore
Path Finder

Here is how to get the Chat ID
Step 1. Enter the following command on your browser. Use your Bot Token (it's the long token)

https://api.telegram.org/bot<yourtoken>/getUpdates

Step 2. Look at the result. You should see your chat id

If you cannot see your chat id, remove your bot from the chat and add it back. Resend the command and you will see the chat id. Take note that the chat id includes the minus sign.

For completeness, this is what you should do to get a Bot Id.
1. Add BotFather as your contact in Telegram
2. Chat with BotFather and request a new bot by running

/newbot

You should get a long token. This is your Bot Id.
3. Create a group chat in Telegram and your bot into the group.

0 Karma

Richfez
SplunkTrust
SplunkTrust

Hi!

Can you provide a little context as to what you already have in Splunk and what you don't, how you are accessing the information (API directly, API calls generating files that you ingest or whatever) and perhaps what you have access to using that method?

Thanks,
Rich

0 Karma

hgehrts_splunk
Splunk Employee
Splunk Employee

I am using the telegram integration from splunkbase. The UI asks for a Bot ID and a Chat ID. I got the Bot ID, but I don't know where I get the chat ID.

0 Karma

a_salikov
Path Finder

Hi,

Can you show how look likes Bot ID, I have Chat ID, but I couldn't find Bot ID and for send from alert to Telegram should I provide Splunk server with Internet?

Thank you so much!

0 Karma

ragedsparrow
SplunkTrust
SplunkTrust

Your Bot ID is provided by the "Bot Father" when you create your bot in Telegram. The Telegram documentation goes pretty well into how to do it:

https://core.telegram.org/bots#6-botfather

0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...