0

I have a ticketing systems powered by osTicket open source platform. I found a plugin made for odTicket in Github and it mentioned it can send notification of new tickets to a telegram group or channel. The process is that I need to create a bot and paste the bot url *with token) and Chat Id. Here is the documenting of this plugin:

Clone this repo or download the zip file and place the contents into your include/plugins folder. Insert Telegrams Bot URL for your bot (ex. https://api.telegram.org/bot<token>/) and Chat ID.

I created a bot and connceted to a group. the bot urls is:

https://api.telegram.org/bot<token>

and group Id:

osticketchat

Howeverm I don't get any notification in my telegram when posing a new ticket. When I paste the bot url in browser I get:

{"ok":false,"error_code":404,"description":"Not Found"}

I'm not a developer, so I;m not sure if the url is correct or not (I'm sure about the token). Somewhere I read I can add getMe method at the end of url to check if it's working and when I did I get the following message :

{"ok":true,"result":{"id":1672003338,"is_bot":true,"first_name":"osTicket Notification","username":"rafieeticketbot","can_join_groups":true,"can_read_all_group_messages":false,"supports_inline_queries":false}}

The ticketing website is :

https://help.rafiee.net

I would be so grateful if someone can help me know what is wrong to solve it. Thank you.

Majid
  • 421
  • 6
  • 19

1 Answers1

0

Ok,

I found the problem. First, I need to add the bot to the group or channel. Second, group or channel chat id can be gotten by adding getUpdates at the end of url. And finally, I need an edit in Telegrambot.php line 35 by adding a negative sign (-) before $chatid since chat id of group and channels in telegram is negative.

Majid
  • 421
  • 6
  • 19