1

I'm trying to send a text for example "Hello # World" with Telegram API with this url:

https://api.telegram.org/bot'token'/sendMessage?chat_id='chatid'&text=Hello+#+World

But I just receive Hello

I also tried to encode it like this:

https://api.telegram.org/bot'token'/sendMessage?chat_id='chatid'&text=Hello+%23+World

But I just receive Hello %23 World.

Any solution to receive Hello # World? Thanks :D

0stone0
  • 34,288
  • 4
  • 39
  • 64
J--
  • 67
  • 4

1 Answers1

0

You did not url-encode the string properly, it should be

Hello%20%23%20World

Instead off

Hello+%23+World

The complete url:

https://api.telegram.org/bot<TOKEN>/sendMessage?chat_id=<CHAT-ID>&text=Hello%20%23%20World

enter image description here

0stone0
  • 34,288
  • 4
  • 39
  • 64