Airgram

Guides
/
/
Methods

api.recoverPassword()

Recovers the 2-step verification password using a recovery code sent to an email address that was previously set up

Parameters RecoverPasswordParams:

NameTypeDescription
recoveryCodestring Recovery code to check
newPasswordstring New password of the user; may be empty to remove the password
newHintstring New password hint; may be empty
Returns ApiResponse interface:
interface ApiResponse {
  _: 'recoverPassword' | 'error'
  airgram: Airgram
  request: {
    method: 'recoverPassword'
    params: RecoverPasswordParams
  }
  response:  | 
  setState: (nextState: Record<string, unknown>) => void
  getState: () => Record<string, unknown>
}