Skip to content
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

Inline keyboard callback and auth by chat id #80

Closed
AntonioNav opened this issue Jul 5, 2019 · 4 comments
Closed

Inline keyboard callback and auth by chat id #80

AntonioNav opened this issue Jul 5, 2019 · 4 comments

Comments

@AntonioNav
Copy link

Hello,

I'm trying the inlinekeyboard flow example, but setting a chat id in my telegram bot node to only allow use my bot from this chat. The command /foo works well and display the two buttons (yes - no), but when I press the buttons, I receive an error: "Unauthorized incoming call from ....". If I add my telegram user as authorized, works well.

I tried to add msg.payload.chatId = -xxxxxxxx; to 'inline keyboard message' (line 21), but no luck. Any idea about what i'm doing wrong?

Regards,

@windkh
Copy link
Owner

windkh commented Jul 6, 2019

Could you send me the flow so that I can have a look on it?

@AntonioNav
Copy link
Author

Hello,

I use this example flow: https://github.com/windkh/node-red-contrib-telegrambot/blob/master/examples/inlinekeyboard.json#L1

I only change the telegram bot configuration node to setup my token and the chatid.

@windkh
Copy link
Owner

windkh commented Jul 6, 2019

I will check this

@windkh
Copy link
Owner

windkh commented Jul 6, 2019

I just tested the flow and everything worked well.
First of all I would try to clear the chatids and users fields to make sure that the flow works without authorization checks. Then I would try to add your username to check if there is a spelling problem.
As a cross check you could clear the Users field and anter your userid in the chatis field of the configuration nod (a positive number)...

I guess there is a spelling error or something like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants