Open yashwanth2804 opened 2 years ago
There is an error in the documentation. The code must be 6 characters long
still not working((( any idea?
I can confirm that it's not working as it is returning PHONE_CODE_INVALID
when using test environment.
And it has nothing to do with code being 6 characters long as signUp
method is not working with the code
, only the phone_code_hash
Can you please check?
the same
} nDc();
function sendCode(phone) { return api.call('auth.sendCode', { phonenumber: phone, settings: { : 'codeSettings', }, }); }
function signUp( phone, phone_code_hash ) { console.log( phone, phone_code_hash ) return api.call('auth.signUp', { phone_number: phone, phone_code:code, phone_code_hash: phone_code_hash, first_name: 'MTProto', last_name: 'Core', }); }
{ : 'auth.sentCode', flags: 0, type: { : 'auth.sentCodeTypeSms', length: 5 }, phone_code_hash: 'a3b4dc965e02ac2586' }