Forwarding messages from Telegram Bot - python-3.x

I need to do the following:
user sends all kind of messages to my bot;
bot should forward the particular messages to my channel like this:
bot.forward_message(chat_id='my_chat_id', from_chat_id='my_chat_id_from_which_I_am_forwarding', message_id=message.message_id)
However, I am getting this error:
ERROR - init:__threaded_polling:515 - A request to the Telegram API was unsuccessful. Error code: 400. Description: Bad Request: message to forward not found, 2021-03-09 18:44:15,950
When I debug this, message.message_id and message.text are correct. Does anybody have any ideas or suggestions?

bot.forward_message(
chat_id="#channel",
from_chat_id="chat_id_from_which_I_am_forwarding",
message_id=message.message_id)
You need to add the bot as admin in the channel!!

Related

pyTelegramBotAPI Error code: 400. Description: Bad Request: have no rights to send a message

Someone drops my bot down and then the same guy turn my bot on, I got a error:
(init.py:1083 MainThread) ERROR - TeleBot: "Threaded polling exception: A request to the Telegram API was unsuccessful. Error code: 400. Description: Bad Request: have no rights to send a message"
How can I fix it?

telegram bot payment BOT_PRECHECKOUT_TIMEOUT

When paying in the bot (via payments Sberbank test and Yukassa test (didn't try other acquirers)), the bot responds to update with pre_checkout_query using answerPreCheckoutQuery and receives the response {"ok":true,"result":true}.
But the "BOT_PRECHECKOUT_TIMEOUT" error appears in the payment window. The error occurs on different accounts and different acquirers. The error occurs even if you perform the bot's actions manually.
Is that a problem on my side?
getting pre_checkout_query
answerPreCheckoutQuery
result

Twitter API issue (code: 349, message: 'You cannot send messages to this user.') in node.js

I am sending message by using direct_messages/events/new method in Node.js by using API,
But i am getting the errors like { code: 349, message: 'You cannot send messages to this user.' }
please help me to solve this issue.
Thanks
If the user is not following you or has blocked you, then you will not be able to send messages to the user.
You can also send messages to a user that is not following you but has DM'd you (e.g. if your id accepts DMs without requiring mutual following). However, if the user is not following you/has blocked you (as mentioned by Andy Piper) or has not DM'd you, you'll receive the "code: 349, message: 'You cannot send messages to this user.'" error. Tested via postman using the direct message api (https://api.twitter.com/1.1/direct_messages/events/new.json).

Why Botframework bot only works only on Emulator and none of the other channels?

Bot Info
Bot handle: Medibot_medibuddy
App ID: dcda60fe-72d4-4796-a728-de8fa3aef2a5
SDK Platform: Node.js
SDK Version: Latest
Active Channels: WebChat, Facebook, Skype
Deployment Environment: Azure App Service
Issue Description
Our bot (Medibot, https://medibotmb.azurewebsites.net) has suddenly stopped working on all channels including WebChat. It works perfectly on Emulator though. We've been trying to debug this issue since days and have not been successful with any solutions/suggestions online. I've tried using Log stream and debug console to catch exceptions but there aren't any.
Code Example
The code is hosted in https://github.com/nirmalrayan/medibot
Reproduction Steps
Visit medibotmb.azurewebsites.net. This should open WebChat channel's index.html document.
The page tries to load for a long time and throws HTTP status: 500, HTTP subStatus: 1001, HTTP Reason: Internal Server Errror.
Bot framework displays the error message 'There was an error sending this message to your bot: HTTP status code GatewayTimeout' for Facebook and Web Chat channels.
Expected Behavior
Render index.html page with Web Chat iframe.
After the user sends first message, the bot welcomes with a hero card.
Actual Results
Nothing happens. The page does not get rendered. No exception in thrown in log stream while testing. Even botframework 'Test' does not throw any error in Azure app service log stream.
node.js
I don't see the iframe code in the index.html of https://medibotmb.azurewebsites.net

Playhaven HTTP error= "403 Forbidden" response= "invalid signature";}

I am a newby who purchased a reskin app and I'm having problems when trying to get the ads to pop up while in Xcode 7 testing on my iphone. I followed the steps to enter the token and secret ID codes after registering the app in playhaven but I keep getting the below error when running the test on Xcode in the debug area.
Stackoverflow is my last resort as the guy who sold me the app can't help...
Playhaven-1.24.0 Request received HTTP response: 403
Playhaven-1.24.0 Request finished
Playhaven-1.24.0 Server response
errorbj - null
error - 403 Forbidden
response - invalid signature
I have tried the new SDK but get more errors/bugs
Please help me
Thanks so much
Andy
Seems like playhavens end doesnt communicate with my account and token codes etc, same with Startapp!

Resources