Skip to main content

AuthN | Node SDK | Invite Endpoints

Invite Endpoints

Invite User

invite(request: InviteRequest): Promise<PangeaResponse<InviteResult>>

Send an invitation to a user.

required parameters

InviteRequest

Response Object

Promise<PangeaResponse<InviteResult>>
const response = await authn.user.invite({
  inviter: "admin@email.com",
  email: "joe.user@email.com",
  callback: "https://www.myserver.com/callback",
  state: "pcb_zurr3lkcwdp5keq73htsfpcii5k4zgm7",
});

Delete Invite

delete(id: string): Promise<PangeaResponse<{}>>

Delete a user invitation.

required parameters

string

A one-time ticket

Response Object

Promise<PangeaResponse<{}>>
await authn.user.invites.delete(
  "pmc_wuk7tvtpswyjtlsx52b7yyi2l7zotv4a"
);

List invites

list(request: ListRequest): Promise<PangeaResponse<ListResult>>

Look up active invites for the userpool.

required parameters

ListRequest

Supported options:

  • filter (object)
  • last (string): Reflected value from a previous response to obtain the next page of results.
  • order (AuthN.ItemOrder): Order results asc(ending) or desc(ending).
  • order_by (AuthN.User.Invite.OrderBy): Which field to order results by.
  • size (number): Maximum results to include in the response.

Response Object

Promise<PangeaResponse<ListResult>>
const response = await authn.user.invites.list(
  {
    order: AuthN.ItemOrder.ASC,
    order_by: AuthN.User.Invite.OrderBy.ID,
    size: 20,
  }
);