auth.requestFirebaseSms
Request an SMS code via Firebase.
func (c *Client) AuthRequestFirebaseSMS(ctx context.Context, request *AuthRequestFirebaseSMSRequest) (bool, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.AuthRequestFirebaseSMS(ctx, &tg.AuthRequestFirebaseSMSRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // bool
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
PhoneNumber | string | yes | Phone number |
PhoneCodeHash | string | yes | Phone code hash returned by auth.sendCode |
SafetyNetToken | string | — | On Android, a JWS object obtained as described in the auth documentation » |
PlayIntegrityToken | string | — | On Android, an object obtained as described in the auth documentation » |
IosPushSecret | string | — | Secret token received via an apple push notification |
Returns
bool
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | PHONE_CODE_EMPTY | phone_code is missing. |
| 400 | PHONE_NUMBER_INVALID | The phone number is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
auth.requestFirebaseSms#8e39261e