How to dm on telegram


How to Send Message in Telegram

Telegram is a cloud-based messaging app that adds a lot of convenience to your communication. The platform lets you transfer conversations between computers, smartphones, and tablets. It also provides great security, owing to the secret chats feature. But how exactly do you send messages on Telegram?

In this entry, we’ll go through all intricacies of Telegram messaging.

How to Send a Message on Telegram

Quick Links

  • How to Send a Message on Telegram
  • How to Send a Message to Myself on Telegram
  • How to Send a Message to a Bot on Telegram
  • How to Send a Voice Message on Telegram
  • How to Send a Direct Message on Telegram
  • How to Send a Video Message on Telegram
  • How to Send a Message on Telegram With an API
  • What to Do if Telegram Fails to Send a Message
  • What to Do if Telegram Is Unable to Send a Message
  • Additional FAQs
    • How Can I Send Message to Telegram API?
    • Can Telegram Send SMS?
  • Step Up Your Chat Game

Sending a message on Telegram is just as easy as with other similar apps:

  1. Download and install the app from Google Play or App Store.
  2. Type in your phone number and enter the verification code Telegram sends you.
  3. Add a picture and your name.
  4. Allow Telegram to access your contacts list.
  5. Hit “Contacts” in the lower part of your screen, and you’ll see a list of friends using the app.
  6. Select a friend and use the text field to type and send your message.

How to Send a Message to Myself on Telegram

You can send a message to yourself with the “Saved Messages” function:

  1. Open the app and go to the menu in the top-left corner.
  2. Press “Saved Messages.”
  3. Type your message here, and you’re all done.

How to Send a Message to a Bot on Telegram

Once Telegram bots are set up, users can interact with them by sending commands, messages, or requests. Here’s how the process works:

  1. Start Telegram and enter your log-in information.
  2. Type in “@Botfather” in your search bar and choose the bot that appears in the search results.
  3. Press the “Start” button to activate the bot.
  4. Enter “/newbot” and send the command.
  5. Select a name and username for the bot. Users will be able to find their bot by searching for its username, but it mustn’t overlap with other bots’ usernames.
  6. Once you’ve chosen an appropriate name for the bot, it will be created. You’ll then receive a link to the bot, suggestions on setting up the profile picture, commands for managing the bot, and some other details.
  7. Follow your link and you’ll be able to send your bot a message the same way you do with your friends.

How to Send a Voice Message on Telegram

If you’re too busy to type, sending a voice message to your friend will save you some time:

  1. Open Telegram and go to your chat windows.
  2. Choose a chat and tap the microphone symbol in the lower-right corner.
  3. Hold the symbol and start talking.
  4. Once you’re done, release the symbol, and the voice message will be sent.

How to Send a Direct Message on Telegram

Direct messages are also referred to as private messages on Telegram. Sending them is relatively straightforward:

  1. Launch Telegram.
  2. Press “New message.”
  3. Select the recipient of the message.
  4. Press the username of the person to open your chat with them.
  5. Type in your message.
  6. Hit the “Send” button, and you’re good to go.

How to Send a Video Message on Telegram

Telegram doesn’t lag behind other platforms in terms of the media you can send through the app. One of your options is a video message:

  1. Start the app and open a chat.
  2. Hit the microphone symbol to launch camera mode.
  3. Hold the camera symbol and record your message.
  4. Release your recording button, and the message will be sent.

How to Send a Message on Telegram With an API

Using an API to send your Telegram message is a bit more complex. You’ll require the services of a bot:

  1. Find the Botfather bot by looking it up in your search box.
  2. Once you’ve set up your bot, type in “/newbot” in the chat box. You’ll then be asked to name your bot and give it a username. You’ll then receive a link to the bot and your API token.
  3. Click the link to reach the box where you’ll receive your messages. Since bots are designed not to send spam, they can’t start a chat, meaning that you’ll need to send a message first to allow the bot to text you back.
  4. You now need to call Telegram’s API to obtain your chat_id. You have two methods here.
  5. The first one comes down to reading the text you sent using curl and its getUpdates approach: curl https://api.telegram.org/bot%7BYOUR_API_KEY_HERE%7D/getUpdates
  6. Alternatively, you can use Python 3:
    • >>> import requests
    • >>> token = {YOUR_API_KEY_HERE}
    • >>> url = f'https://api. telegram.org/bot{token}/getUpdates'
    • >>> requests.post(url).json()
  7. You should then receive your JSON payload: {"ok":true,"result":[{"update_id":12671344, "message":{"message_id":30,"from":{"id":{YOUR_ID},"is_bot":false,"first_name": "{YOUR_NAME}" ,"username":"{YOUR_USERNAME}","language_code":"en"},"chat":{"id":{YOUR_CHAT_ID},"first_name":"{YOUR_FIRST_NAME}","username":"{YOUR_USERNAME}","type":"private"},"date":1560719493,"text":"{YOUR_SENT_MESSAGE}"}}]}
  8. Use {YOUR_CHAT_ID} number that consists of approximately nine numbers.
  9. You’ll now be able to send a message with the sendMessage function: curl -d chat_id={YOUR_CHAT_ID} -d text="test msg from curl" https://api.telegram.org/bot{YOUR_API_KEY_HERE}/sendMessage
  10. Another option is Python 3:
    • >>> import requests
    • >>> token = {YOUR_API_KEY_HERE}
    • >>> url = f'https://api. telegram.org/bot{token}/sendMessage'
    • >>> data = {'chat_id': {YOUR_CHAT_ID}, 'text': 'python msg'}
    • >>> requests.post(url, data).json()
  11. You’ve now successfully sent a message using Telegram’s API.

What to Do if Telegram Fails to Send a Message

If your Telegram doesn’t send a message for some reason, two simple solutions might do the trick:

  1. Return to Telegram’s front page and head back to your message.
  2. Alternatively, restart the app, return to the message and try to re-send it.

What to Do if Telegram Is Unable to Send a Message

If you can’t send your message and the problem persists, your best option is to reach out to Telegram’s customer support. You can describe your issue here, enter your phone number, and leave your email address. Hopefully, their team will feed you a viable solution.

Additional FAQs

How Can I Send Message to Telegram API?

Sending a message to Telegram’s API requires you to set up a bot. Next, you’ll need to use curl or Python 3 to generate your chat_id and send your message using the sendMessage command.

Can Telegram Send SMS?

Unfortunately, you can’t send an SMS using Telegram. The app still doesn’t support this feature.

Step Up Your Chat Game

If you thought you might not be into Telegram due to cumbersome messaging features, all your worries are now dispelled. The app is easy to use, and once you’ve activated it, texting is just as easy as on any other platform. Best of all, you can send videos, voice messages, and even set up bots and issue various commands. The options are nearly endless.

Have you set up your Telegram profile? Do you find the interface user-friendly? Are all the features easily accessible? Let us know in the comments section below.

How to Rename Columns in the Google Sheets App

Read Next 

Telegram Bridge | Element Knowledge

This guide explains how to use the Telegram bridge from the EMS Integration Manager to integrate your Telegram chats with your EMS server.

It requires your EMS server to have federation on.

The following instructions are done with the Element Desktop on the Element side and on Element iOS for the Telegram side. Element Android should be almost identical to Element Web.

Purchase the Telegram integration

  1. Open the EMS control panel at: https://ems.element.io/user/hosting

  2. Click the Integrations tab and if you have more than one server, select the server you wish to add the Telegram integration to.

  3. Click on Telegram Bridge in the list of available Bridges.

  4. Enter the maximum number of users in Maximum Telegram users.
    Please note: this is the maximum number of Telegram users who actually send messages over the bridge each month. You are only billed for the number of Telegram users who are active. Once you exceed the maximum, then the bridge will be disabled until you increase the maximum.

  5. If you wish to allow Matrix users who aren't logged in to Telegram to participate in bridged Telegram chats, follow the steps in this section.

Once you have entered Maximum Telegram users, click Purchase (remember you can always go back to this step and increase the maximum number of Telegram users if you need more in the future).

  1. A dialogue will remind you of the price per user and ask if you wish to proceed. Click Purchase if you wish to proceed with the Telegram Integration.

  2. You will have to wait a few minutes while your host is reprovisioned. Once reprovisioning is finished, you are able to bridge Telegram to your EMS server using your Element client.

Bridge Telegram to your Element account

  1. Once the bridge is running, open your Element app. Click on the + next to People.

  2. Create a Direct Message conversation by typing @telegram:example. ems.host (replace the domain with the one of your homeserver). Then click Go.

  3. Wait for the bridge account to join your room.

  4. Open Telegram on your mobile device (iOS or Android) and tap on ≡, go to Settings, and then Devices, and then Scan QR Code to start the Telegram QR code scanner. You will use this QR code scanner to scan a QR code displayed by your Element client in the next step.

  5. From your Element client, send a login-qr message to the bot to connect to your Telegram account.

  6. A QR code will be displayed. Quickly scan the QR code with Telegram on your mobile device.

  7. On your Element client, you will see Successfully logged in as <username>.

Sending a message to a Telegram User

To send a message to a Telegram user, you must first be connected to the bridge (see above).

  1. On your Element client, open the "Telegram bridge bot" room.

  2. Say pm followed by the phone number or username. The phone number must exist in your Telegram contacts.

  3. You will be invited to a DM with that user, and can send messages to them.

Bridging Matrix users without a Telegram acccount

By default, a Matrix user will have to connect their Telegram account for their messages to be bridged to Telegram. If you provide a bot token, we will use this bot to relay the messages of any Matrix users to Telegram. (Note: relaying is supported for Telegram groups, but is not yet supported for Telegram channels.)

Follow these steps to register a bot account with Telegram.

  1. With your Telegram account, message @BotFather. If talking to BotFather via the bridge using Element, note that all "slash" command messages (eg. /start) sent to BotFather must begin with two slashes instead of one (eg. //start).

  2. Create a new bot by sending the message /newbot to BotFather. The created bot will be the Telegram relay bot used by your bridge. Follow the subsequent prompts to give your bot a display name and a username.

  3. Wait for BotFather to provide you a bot token.

  4. Send the message /setprivacy to BotFather and follow the prompts to set your new bot's privacy settings to "Disabled". This allows your relay bot to bridge all messages sent in a Telegram group, not just messages that mention the bot by name.

  5. Open the EMS control panel for your Telegram bridge and enter the token you received from BotFather in the "Bot token" field, then wait for the page to notify you when your bridge is ready.

  6. In your Element client, view your DM with the Telegram bridge bot and send the ping-bot command. The bot should respond with the ID of your relay bot in Matrix, which indicates that the relay bot has been set up correctly.

  7. In your Element client, invite the Matrix relay bot to any room that bridges a Telegram group that should relay Matrix users' messages to Telegram. A convenient way to do so is to send a message of !tg ping-bot in such a room (which will be intercepted by the bridge bot & won't appear in Telegram), wait for the bridge bot to respond with a "pill" of the relay bot's Matrix ID, click on the pill, and then click "Invite" on the sidebar that appears.

  8. In Telegram, confirm that your Telegram relay bot has joined the group. If it hasn't, you may manually invite your bot to the group (as long as you have permissions to do so) by viewing the group's details, selecting "Add Members", and entering the username of your relay bot that you chose in step 2.

How to write a message in Telegram

Skip to content

Last update - October 20, 2017 at 12:00

article on how to send messages .

It would seem that this is quite simple, but still I want to tell you about some interesting nuances that you might not know.

[adsp-pro-1]

To begin with, I propose to figure out how to send messages to other users of the messenger:

1. Open the application on your device and click on the edit icon

, which is located in the lower right corner.

2. Next, select a contact from the list or find the user through the search / mobile phone number.

  • If you wish, you can create a chat with yourself in Telegram;

3. Now we write a message and send it by clicking on the icon

located in the lower right corner of the dialog.

4. If desired, you can attach attachments by clicking on the three dots

[adsp-pro-2]

After sending a message before it is read, you can edit or delete it. To do this, just click on the message itself.

  • You can delete a message from the interlocutor within 48 hours, even if the user has read it;
  • You can also forward the message to another user;
  • If you want, you can disable notifications in Telegram;

[adsp-pro-3]

That's all you need to know about writing a message in Telegram. The main thing is not to delete important messages, because it will not be possible to restore them.

Telegram / FAQ No comments

Related articles:

  • How to delete a channel in Telegram
  • How to create a channel in Telegram
  • How to create a group in Telegram
  • Geolocation in Telegram: how to send location
  • Cloud storage: chat with yourself 9035 in Telegram 9035 How to block a contact in Telegram
  • How to delete a contact in Telegram
  • How to turn off notifications in Telegram
  • How to change the subject in Telegram
  • 0036
  • How to put a password on Telegram
  • How to add stickers to Telegram
  • How to hide a phone number in Telegram
  • How to delete messages in Telegram
  • How to create a secret chat in Telegram
  • How to write a message in Telegram
  • find people in 90 Telegram
  • How to change the name in Telegram
  • How to find a group (channel) in Telegram
  • How to translate Telegram into Russian
Q&A:

How to send a message to Telegram


Here we tell you how to send private messages to Telegram using a bot.

If you want to send messages not to private messages, but to a group in Telegram, then refer to this instruction.

How to set up sending messages

Build a script

To send something to Telegram, we first need to write information to a variable. You can collect several parameters, write them into variables, and transfer all these variables to Telegram. Before sending data, you must have a script section with writing to variables.

Complete this lesson to build a scenario.

After completing the tutorial, you will have 5 variables:

  • for the name
  • for last name
  • for phone
  • for email
  • for service type

Publish the bot on Telegram

Follow the instructions to publish the bot on Telegram.

If you have already published a bot in Telegram, go to the next step.

Get chat_id

In order to receive a message in Telegram, the bot must know who to send it to. You can get chat_id of your account (or the account of the person you want to send this information to) so that you can send messages using the bot.

To get chat_id create a new screen in the script with the text:

$rawRequest.message.from.id

Place this screen at the beginning of the script so that this screen is in the upper left corner . Thus, this screen will be the first one when the bot starts.

Publish the bot

Click Publish and wait for the message that the script has been published on the Telegram channel.

Test the bot

Now go to your Telegram bot ( not in the test widget! ) and send to the bot:

/start

If you want messages to be sent not to you, but to another person, then simply send this person a link to the bot. If this user communicates with this bot for the first time, the bot will immediately send the value chat_id . If this user has already chatted with this bot before, then ask the user to send /start to the chat to get the chat_id.

The bot will send you the required value:

Copy and paste the number sent by the bot into notepad .

Remove screen with text $rawRequest.message.from.id . He is no longer needed.

Submit data

The next step is to send the data received from the client. To do this, in the script, after collecting all the necessary information , there must be an HTTP request block. With a single request, you can pass several variables at once:

The block must be formatted as follows:

Method
GET

Formation of URL

To create a URL, copy the line into notepad: https://api. telegram.org/bot/sendMessage

Then go to Telegram to the Botfather channel and copy the token of your bot, which was generated when you published the channel:

In a notebook select

and inste Telegram:

You will get something like this:

Now select the entire line and paste it into the HTTP request URL field in Aimylogic

Formatting the field
BODY

In BODY we need to specify:

  • the value chat_id that we received earlier

  • all the variables that we have collected in the script so far.

If you repeated the lesson on collecting contact data, then in the script you received the following information:

Your name: $name Your last name: $lastname Your phone number: $PHONE Your email: $EMAIL Type of service: $service

That's why we use these variables now.

So, you need to insert the value chat_id and list the variables that were in the script before sending.

Pay attention to indentation and punctuation! We recommend not typing, but copy and paste.

{ "chat_id": 123456789, "text": "Customer name: $name $lastname, phone number: $PHONE, email: $EMAIL, Service type: $service"}

Press Save .

Done, we have issued an Http request to send data.

Check the status of the submission

From the "Completed successfully" logic, we add a link to a new screen containing a message that the data was successfully sent. For example, “Thank you, your data has been successfully sent!”

From the logic “Completed with an error” we make a connection with the screen containing the text block “Error $httpStatus ”. This block will help us understand what the problem is if the http request is not successful.

Test scenario

Click Test and talk to the bot.

As a result of the dialogue, the necessary information should come to Telegram.

Note that the bot will send a message to your conversation with the bot. If you expect to receive a private message from some other account, you may be confused by this behavior. But in the future, when other people write to the bot, and you will receive messages from the bot, it will be more clear to you what is happening. Ask another person to send their name and phone number to the bot, and then you will receive a message from the bot.

Troubleshooting

You click Test and the bot throws an error.


Learn more