0

I have the following CURL request

 curl -s -X POST https://api.telegram.org/botxxxxx/sendMessage -d chat_id=-xxxx -d text="Remember guys,%0A%0A\<b\>THERE IS NO GLOBAL ROM, NO PLAYSTORE, NO GOOGLE PAY, NO ROOT, NO BOOTLOADER UNLOCK\!\</b\>,%0A%0AI will let you know when that changes, for more information on your watch, and how to remove chinese apps please visit http://miwatch.cf" -d "parse_mode='html'"

Im trying to send in html so i can have newline and bold text, but I am getting

{"ok":false,"error_code":400,"description":"Bad Request: unsupported parse_mode"

I've also tried HTML/Markdown/MARKDOWN/markdown, same response every time...

Karl
  • 599
  • 7
  • 27

1 Answers1

3

The HTML parse_mode should not be quoted:

-d "parse_mode='html'" ----> -d parse_mode=HTML.

I've used single-quotes around the text so that my terminal won't try to expand the 'special chars';

curl -s -X POST https://api.telegram.org/bot<mytoken>/sendMessage -d chat_id=1234567 -d text='Remember guys, <b>THERE IS NO GLOBAL ROM, NO PLAYSTORE, NO GOOGLE PAY, NO ROOT, NO BOOTLOADER UNLOCK!</b>, will let you know when that changes, for more information on your watch, and how to remove chinese apps please visit http://miwatch.cf' -d parse_mode=HTML

enter image description here

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