Layer 220
AuthRequestFirebaseSms
Request an SMS code via Firebase.
method
Users
auth.requestFirebaseSms#8e39261e flags:# phone_number:string phone_code_hash:string safety_net_token:flags.0?string play_integrity_token:flags.2?string ios_push_secret:flags.1?string = Bool;
Parameters
| Name | Type | Description |
|---|---|---|
| Flags | # | Flags, see TL conditional fields |
| PhoneNumber | string | Phone number |
| PhoneCodeHash | string | Phone code hash returned by auth. send Code |
| SafetyNetToken | flags.0?string | On Android, a JWS object obtained as described in the auth documentation |
| PlayIntegrityToken | flags.2?string | On Android, an object obtained as described in the auth documentation |
| IosPushSecret | flags.1?string | Secret token received via an apple push notification |
Returns
BoolPossible Errors
| Code | Type | Description |
|---|---|---|
| 400 | PHONE_CODE_EMPTY | phone_code is missing. |
| 400 | PHONE_NUMBER_INVALID | The phone number is invalid. |
Gogram Example
// AuthRequestFirebaseSms - using Params struct result, err := client.AuthRequestFirebaseSms(&tg.AuthRequestFirebaseSmsParams{ PhoneNumber: "...", PhoneCodeHash: "...", // Optional fields: // SafetyNetToken: "...", // PlayIntegrityToken: "...", // IosPushSecret: "...", }) if err != nil { // handle error } // result is *tg.Bool