account.getAuthorizationForm
Returns a Telegram Passport authorization form for sharing data with a service
func (c *Client) AccountGetAuthorizationForm(ctx context.Context, request *AccountGetAuthorizationFormRequest) (*AccountAuthorizationForm, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.AccountGetAuthorizationForm(ctx, &tg.AccountGetAuthorizationFormRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // *AccountAuthorizationForm
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
BotID | int64 | yes | User identifier of the service's bot |
Scope | string | yes | Telegram Passport element types requested by the service |
PublicKey | string | yes | Service's public key |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | BOT_INVALID | This is not a valid bot. |
| 400 | PUBLIC_KEY_REQUIRED | A public key is required. |
References
- Official documentation
- Generated Go reference
- TL definition:
account.getAuthorizationForm#a929597a