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

How to configure? Chat id? #1

Closed
SuperJMN opened this issue Jan 20, 2018 · 5 comments

Comments

Projects
None yet
2 participants
@SuperJMN
Copy link

commented Jan 20, 2018

I've created my bot with Bot Father and I got a token, but it seems I also need a chat Id. How do I get it?

Also, this URL is failing:
https://api.telegram.org/botTOKEN/getUpdates

@oxozle

This comment has been minimized.

Copy link
Owner

commented Jan 20, 2018

@oxozle oxozle closed this Jan 20, 2018

@oxozle

This comment has been minimized.

Copy link
Owner

commented Jan 20, 2018

You need to insert TOKEN in url, like To get your id navigate to https://api.telegram.org/botXXXXXXXXXXXXXXXXXXX/getUpdates

@SuperJMN

This comment has been minimized.

Copy link
Author

commented Jan 20, 2018

Thanks! I'm a bit blind... sorry!

@SuperJMN

This comment has been minimized.

Copy link
Author

commented Jan 20, 2018

I've filled the url with my token and all I receive is this:

{"ok":true,"result":[]}

where is the id? :)

EDIT: OK, found it. In order to see something, you have to start a chat with the bot and then, the JSON that this GET method returns has a part with chat : { "id": "some number" } }... where the chat id is "some number".

@oxozle

This comment has been minimized.

Copy link
Owner

commented Jan 22, 2018

Oh, no problem. You should add your bot to your contacts list. Print /start. This will add you as contacts to your bot. Then print some message like test. After that open url with getUpdates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.