-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Valid api_id must be provided #2155
Comments
I can confirm the issue. I'm using tdjson in c++ and setup the parameters with this json-string: I get this error right after sending the string with td_send:
|
Thanks for your help ,Is this an official TD question |
Authorization flow was significantly changed in TDLib 1.8.6: two new authorization states were added, one authorization state was removed, and td/td/generate/scheme/td_api.tl Lines 77 to 119 in 8ab43e5
td/td/generate/scheme/td_api.tl Lines 4619 to 4678 in 8ab43e5
|
Changed the json-string to:
Now the error is solved. Thank you |
Thanks for your help |
Thanks for your help |
Hello. Please tell me who has already worked with the tdlib library? Because I have such a problem: after authorization (at the end writes {"@type":"ok"}), I'm trying to send a request like: {"@type":"SendMessage","chat_id":"-1001628740950","input_message_content":{"@type":"inputMessageText","text":{"@type":"FormattedText","text":"Hello!"}}} If I listen to the answer again, I get for example: And so on.. That is, the request does not work, but it does not issue any error, it constantly sends some kind of @type":"updateOption" with different parameters. Please tell me who knows what's wrong? And how should this library work in general?) |
@andrey882006 You are not correctly handling updates. |
I looked, and more than once - but somehow I didn't find anything about it there. |
Hello, I see you already have experience working with the tdlib library. Could you please suggest such a problem: after authorization (at the end writes {"@type":"ok"}), I'm trying to send a request like: {"@type":"SendMessage","chat_id":"-1001628740950","input_message_content":{"@type":"inputMessageText","text":{"@type":"FormattedText","text":"Hello!"}}} If I listen to the answer again, I get for example: And so on.. That is, the request does not work, but it does not issue any error, it constantly sends some kind of @type":"updateOption" with different parameters. Please tell me who knows what's wrong? And how should this library work in general? |
@andrey882006 The wrong that you are not correctly handling updates. Each time you call On initialzation TDLib may send number of important updates such as |
OK, tell me, the first time I listen, instead of authorization data, the library gives me the answer: {"@type":"updateOption","name":"version","value":{"@type":"optionValueString","value":"1.7.9"}} Is this normal at all? And if so, how do I handle this update? |
@andrey882006 Yes, it's normal because you didn't process that update. Everything is described in docs: https://core.telegram.org/tdlib/getting-started TDLib usage examples are here: https://github.com/tdlib/td/tree/master/example#tdlib-usage-and-build-examples |
I can normally use tdjson in version 1.8.5 of tdlib, but in version 1.8.6 I am prompted "Valid api_id must be provided". How can I solve this problem?
The text was updated successfully, but these errors were encountered: