Airgram

Guides
/
/
Methods

api.deleteAccount()

Deletes the account of the current user, deleting all information associated with the user from the server. The phone number of the account can be used to create a new account. Can be called before authorization when the current authorization state is authorizationStateWaitPassword

Parameters DeleteAccountParams:

NameTypeDescription
reasonstring The reason why the account was deleted; optional
Returns ApiResponse interface:
interface ApiResponse {
  _: 'deleteAccount' | 'error'
  airgram: Airgram
  request: {
    method: 'deleteAccount'
    params: DeleteAccountParams
  }
  response:  | 
  setState: (nextState: Record<string, unknown>) => void
  getState: () => Record<string, unknown>
}