Telegram Bot

Send data into your telegram channel, group with simple API endpoint.

Overview

Telegram is one of the most popular messaging apps that giving us the opportunity to connect with our friends anytime and anywhere. People also use Telegram to receive any notification when something occurred in their application. For example, if you are writing a billing application, you might send an "Invoice Paid" notification to your users via telegram.

With SlashApi you can easily send this notification by using a simple API endpoint, just pass the data or text on the API endpoint and a message will send to a Telegram account.

Getting Started

After you create an account and log in to the dashboard, choose Telegram Bot on the collections page. To make Telegram API you need 2 parameters:

  • Bot Token - To get Bot Token you need to contact the BotFather, which is essentially a bot used to create other bots.
  • Chat ID - ID of the chat

When your bot is created, just fill the Telegram API Form, click on the submit button and your API is ready.

API Endpoints

Send Text

Pass text data as query POST request and you will recieved the data in your channel

POST
<team>/telegram/<identifier>
Parameter Description
text [required] Pass the text
parse_mode Send Markdown or HTML
disable_web_page_preview Disables link previews for links in this message
disable_notification Sends the message (silently)

Send Location

Pass location data as query POST request and you will recieved the location data in your channel

POST
<team>/telegram/<identifier>/location
Parameter Description
latitude [required] Pass the latitude
longitude [required] Pass the longitude
disable_notification Sends the message (silently)

Send Photo

Send photo to telegram

POST
<team>/telegram/<identifier>/photo
Parameter Description
image [required] Pass the photo url
caption Photo caption
disable_notification Sends the message (silently)

Send Document

Send document to telegram

POST
<team>/telegram/<identifier>/document
Parameter Description
file [required] Pass the document url
caption Document caption
disable_notification Sends the message (silently)

Send Audio

Send audio to telegram

POST
<team>/telegram/<identifier>/audio
Parameter Description
audio [required] Pass the audio url
caption Audio caption
duration Duration of the audio in seconds
performer Audio performer
track Audio track
disable_notification Sends the message (silently)

Send Voice

Send voice to telegram

POST
<team>/telegram/<identifier>/voice
Parameter Description
voice [required] Pass the voice url
caption Voice caption
duration Duration of the audio in seconds
disable_notification Sends the message (silently)