Variable InboxSDKConst

InboxSDK: {
    authenticate(token, options): Promise<Inbox>;
} = ...

The main entrypoint for the Inbox SDK.

Type declaration

  • authenticate:function
    • Authenticate with the Inbox using the given JWT.

      The token has the following fields, plus an additional field for the scope (see below).

      {
      "iss": "Your application name",
      "exp": 1711634350,
      "iat" => 1711634150,
      "name" => "Full name",
      "email" => "operator@example.com",
      "id" => "my-application/a32346d1-3d6b-4552-b6f2-aad710855f00"
      }

      The id field can be anything that can help identify this user in your own system. This field is then exposed as the externalId field in various places, such as the StudioUser object.

      The scope of the token can be either:

      • Bot-scoped by setting a bot_id with the UUID of the bot. The JWT must then be signed with the API key of the bot.
      • Environment-scoped by setting an environment_id. The JWT must be signed with the API key of the environment.

      Parameters

      • token: string
      • options: Partial<Options>

      Returns Promise<Inbox>

Generated using TypeDoc