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

can't find method for sign up #561

Closed
merlinkory opened this issue May 15, 2019 · 4 comments
Closed

can't find method for sign up #561

merlinkory opened this issue May 15, 2019 · 4 comments

Comments

@merlinkory
Copy link

Hi!
I can't find method for sing up new user!

If phone number did not register in telegram before, i getting following error after SMS send
PHONE_NUMBER UNOCCUPIED

Help me please with it

@levlam
Copy link
Contributor

levlam commented May 15, 2019

There is no separate method for sign up, you need to just call checkAuthenticationCode whenever TDLib asks for code. See https://core.telegram.org/tdlib/getting-started#user-authorization and examples for more details.

@merlinkory
Copy link
Author

yes and after checkAuthenticationCode i getting PHONE_NUMBER UNOCCUPIED
But if number was registred in telegrabe before - all ok.

This problem with new (not registred in telegram before) phones only

@levlam
Copy link
Contributor

levlam commented May 15, 2019

Your are likely to pass empty first_name and last_name. See documentation of the checkAuthenticationCode method, especially its first_name parameter.

@levlam levlam closed this as completed Jun 5, 2019
@levlam
Copy link
Contributor

levlam commented Sep 8, 2019

Since TDLib 1.5.0 the new method registerUser needs to be used for user registration in the state authorizationStateWaitRegistration.

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