account.setAuthorizationTTL
Set time-to-live of current session
func (c *Client) AccountSetAuthorizationTTL(ctx context.Context, authorizationttldays int) (bool, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.AccountSetAuthorizationTTL(ctx, authorizationttldays)
if err != nil {
return err
}
_ = res // bool
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
AuthorizationTTLDays | int | yes | Time-to-live of current session in days |
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 | TTL_DAYS_INVALID | The provided TTL is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
account.setAuthorizationTTL#bf899aa0