Airgram

Guides
/
/
Methods

api.getExternalLink()

Returns an HTTP URL which can be used to automatically authorize the current user on a website after clicking an HTTP link. Use the method getExternalLinkInfo to find whether a prior user confirmation is needed

Parameters GetExternalLinkParams:

NameTypeDescription
linkstring The HTTP link
allowWriteAccessboolean True, if the current user allowed the bot, returned in getExternalLinkInfo, to send them messages
Returns ApiResponse interface:
interface ApiResponse {
  _: 'getExternalLink' | 'error'
  airgram: Airgram
  request: {
    method: 'getExternalLink'
    params: GetExternalLinkParams
  }
  response:  | 
  setState: (nextState: Record<string, unknown>) => void
  getState: () => Record<string, unknown>
}