I am trying to send a message from MT5 to Telegram using a bot. However, I could not send the message from MT5 to Telegram due to the error:
'Error Code400 Description "Bad request: chat not found"
Has anyone encountered the same problem? Can you give some reasons why this error might have occurred?
I did a lot of research online, but I could not get the right answers.
I have just got the same error" Error Code400 Description "Bad request: chat not found" but everything worked perfectly before. I also did some research & havent found any solution.
Could anyone shed me some light how to fix this problem? Thanks
#include <Telegram.mqh>
//--- input parametersinputstring InpToken="7504821711:AAFljwzACG8ezAhRXzDB2iU9BDM5p0VTDKs";
inputstring InpChannelName="Test_Error_SendMessage";//Channel Name//--- global variables
CCustomBot bot;
intOnInit()
{
//--- set token
bot.Token(InpToken);
//--- return(INIT_SUCCEEDED);
}
//// Press "A" on keyboard to test & get the error: "Error Code 400 Description "Bad request: chat not found"voidOnChartEvent(constint id,constlong& lparam,constdouble& dparam,conststring& sparam)
{
if (id== CHARTEVENT_KEYDOWN && lparam == StringGetChar("A",0)){
conststring msg = bot.Name();
// send msgint res=bot.SendMessage(InpChannelName,msg);
if(res!=0) Print("Error: ",GetErrorDescription(res));
}
}
voidOnTick()
{
return;
}
voidOnDeinit(constint reason)
{
return;
}
// end test
I have just got the same error" Error Code400 Description "Bad request: chat not found" but everything worked perfectly before. I also did some research & havent found any solution.
Could anyone shed me some light how to fix this problem? Thanks
in my case, I just read old posts & know that im trying to send msg to a private channel. So I have just replaced the channel name with chat id & its working perfectly!
Canyou explain how I can read messages from my own telegram channel? There is a bot connected as an admin to this channel, but the text of the message can not pull out. Would you be kind enough to give me a hint?
Start of this week the file Telegram.mqh is giving some issues with the functions "ArrayAdd" and "WebRequest".
Is someone also facing this problems? I tried adding back the original files, but they seem to have the same issue as well.
'ArrayAdd' - no one of the overloads can be applied to the function call Telegram.mqh 14910
could be one of 2 function(s) Telegram.mqh 14910void CCustomBot::ArrayAdd(uchar&[],constuchar&[]) Telegram.mqh 12022void CCustomBot::ArrayAdd(char&[],conststring) Telegram.mqh 13222
'WebRequest' - no one of the overloads can be applied to the function call Telegram.mqh 23015
could be one of 2 function(s) Telegram.mqh 23015
built-in: intWebRequest(conststring,conststring,conststring,conststring,int,constchar&[],int,char&[],string&) Telegram.mqh 23015
built-in: intWebRequest(conststring,conststring,conststring,int,constchar&[],char&[],string&) Telegram.mqh 23015
'ArrayAdd' - no one of the overloads can be applied to the function call Telegram.mqh 7377
could be one of 2 function(s) Telegram.mqh 7377void CCustomBot::ArrayAdd(uchar&[],constuchar&[]) Telegram.mqh 12022void CCustomBot::ArrayAdd(char&[],conststring) Telegram.mqh 13222
'ArrayAdd' - no one of the overloads can be applied to the function call Telegram.mqh 7387
could be one of 2 function(s) Telegram.mqh 7387void CCustomBot::ArrayAdd(uchar&[],constuchar&[]) Telegram.mqh 12022
Henrique Felipini #: Start of this week the file Telegram.mqh is giving some issues with the functions "ArrayAdd" and "WebRequest". Is someone also facing this problems? I tried adding back the original files, but they seem to have the same issue as well.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Hi everyone,
I am trying to send a message from MT5 to Telegram using a bot. However, I could not send the message from MT5 to Telegram due to the error:
'Error Code 400 Description "Bad request: chat not found"
Has anyone encountered the same problem? Can you give some reasons why this error might have occurred?
I did a lot of research online, but I could not get the right answers.
I have just got the same error" Error Code 400 Description "Bad request: chat not found" but everything worked perfectly before. I also did some research & havent found any solution.
Could anyone shed me some light how to fix this problem? Thanks
I have just got the same error" Error Code 400 Description "Bad request: chat not found" but everything worked perfectly before. I also did some research & havent found any solution.
Could anyone shed me some light how to fix this problem? Thanks
in my case, I just read old posts & know that im trying to send msg to a private channel. So I have just replaced the channel name with chat id & its working perfectly!
Thanks Andriy & other pro coders <3
Start of this week the file Telegram.mqh is giving some issues with the functions "ArrayAdd" and "WebRequest".
Is someone also facing this problems? I tried adding back the original files, but they seem to have the same issue as well.
try with this file
try with this file
I was getting some Errors hence I did 4 edits