account.resetAuthorization
Log out an active authorized session by its hash
func (c *Client) AccountResetAuthorization(ctx context.Context, hash int64) (bool, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.AccountResetAuthorization(ctx, hash)
if err != nil {
return err
}
_ = res // bool
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Hash | int64 | yes | Session hash |
Returns
bool
Possible errors
| Code | Type | Description |
|---|---|---|
| 406 | FRESH_RESET_AUTHORISATION_FORBIDDEN | You can't logout other sessions if less than 24 hours have passed since you logged on the current session. |
| 400 | HASH_INVALID | The provided hash is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
account.resetAuthorization#df77f3bc