Airgram

Guides
/
/
Methods

api.getUser()

Returns information about a user by their identifier. This is an offline request if the current user is not a bot

Parameters GetUserParams:

NameTypeDescription
userIdnumber User identifier
Returns ApiResponse interface:
interface ApiResponse {
  _: 'getUser' | 'error'
  airgram: Airgram
  request: {
    method: 'getUser'
    params: GetUserParams
  }
  response:  | 
  setState: (nextState: Record<string, unknown>) => void
  getState: () => Record<string, unknown>
}