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

User connection problem #1

Open
den2204 opened this issue Oct 9, 2020 · 1 comment
Open

User connection problem #1

den2204 opened this issue Oct 9, 2020 · 1 comment

Comments

@den2204
Copy link

den2204 commented Oct 9, 2020

How can I connect user if I try to run it locally? I understood that we cant wait result in connect handler, but we need to prepare server's answer somewhere. I found database change only in start handler, but this code isn't reachable from connect hanlder. Could you explain what should I fix, because I am really confused now. Thank you!

@krnbatra
Copy link
Owner

krnbatra commented Oct 9, 2020

Hey,

That's a really good question! Please go through this StackOverflow question: Telegram bot - OAuth authorization
, specifically this answer: Answer.

Essentially you will need to register an API in AWS API Gateway which you will enter in your Splitwise account redirect URI. The function of the API would be to take the tokens you got from Splitwise and call the
https://telegram.me/my_bot?start=<auth_code>, which will be received in the start handler

If you face the problem of creating an API and passing multiple parameters into a single one, go through this link. Stackoverflow Question

Thanks!

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