How to set AuthenticationCodeType to AuthenticationCodeTypeSms ?
I want code to be sent via SMS
@huang-ju When you receive an authorizationStateWaitCode response it will contain a code_info_ property which tells you how the authorization code was sent, i.e. via Telegram message or SMS, the code will usually be sent through via Telegram message first, in order to send it via SMS you would have to call the resendAuthenticationCode but this will only work if current authorization state is authorizationStateWaitCode and the next_type_ property of authorizationStateWaitCode class is authenticationCodeTypeSms.
Hope that helps
EDIT: I don't think there is a way to make TDLib send authentication code via SMS without first sending it as a Telegram message.
@chairus How do I set the nextType to AuthenticationCodeTypeSms ?
聽
@huang-ju There is no way to do that.

@levlam Why can clients send SMS?
聽
@huang-ju See absolutely correct answer of @chairus again. That's all that clients can do.
Most helpful comment
@huang-ju When you receive an
authorizationStateWaitCoderesponse it will contain acode_info_property which tells you how the authorization code was sent, i.e. via Telegram message or SMS, the code will usually be sent through via Telegram message first, in order to send it via SMS you would have to call theresendAuthenticationCodebut this will only work if current authorization state isauthorizationStateWaitCodeand thenext_type_property ofauthorizationStateWaitCodeclass isauthenticationCodeTypeSms.Hope that helps
EDIT: I don't think there is a way to make TDLib send authentication code via SMS without first sending it as a Telegram message.