Telegram curl text "%device" error "Bad Request: text must be encoded in UTF-8"

1.5k views Asked by At

We're using Telegram notifications to get status of our Virtual Machines and other services using PRTG Monitoring Tool.

Problem

Notificacions are not working via CURL and POST

Configuration

curl -X POST https://api.telegram.org/<BOT_ID>/sendMessage -d 'chat_id=<CHAT_ID>&parse_mode=Markdown&text=%lastmessage %linksensor %since %group %device'

Error

{"ok":false,"error_code":400,"description":"Bad Request: text must be encoded in UTF-8"}

Testing

Playing with the configuration we noticed that Removing "%device" will make it work.

Question

It is a problem with the value "%device" in the Telegram Api via CURL or POST?

It is necessary for us to use "%device" value as it points to a PRTG Internal Variable.

1

There are 1 answers

1
user19900891 On BEST ANSWER

Also encountered this. If you use the synonym placeholder %server instead of %device, then everything starts working.