Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Properties

Methods

Constructors

constructor

  • new default(apiKey: string, host: string, tenantId?: string): default
  • Parameters

    • apiKey: string
    • host: string
    • Optional tenantId: string

    Returns default

Properties

apiKey

apiKey: string

clientBuilder

clientBuilder: default = ...

credentials

credentials: RequestCredentials

host

host: string

Optional tenantId

tenantId: string

Methods

actionUser

  • Takes an action on a user. The user being actioned is called the "actionee" and the user taking the action is called the "actioner". Both user ids are required in the request object.

    Parameters

    • request: ActionRequest

      The action request that includes all of the information about the action being taken including the id of the action, any options and the duration (if applicable).

    Returns Promise<default<ActionResponse>>

activateReactor

  • Activates the FusionAuth Reactor using a license id and optionally a license text (for air-gapped deployments)

    Parameters

    • request: ReactorRequest

      An optional request that contains the license text to activate Reactor (useful for air-gap deployments of FusionAuth).

    Returns Promise<default<void>>

addUserToFamily

  • Adds a user to an existing family. The family id must be specified.

    Parameters

    • familyId: string

      The id of the family.

    • request: FamilyRequest

      The request object that contains all of the information used to determine which user to add to the family.

    Returns Promise<default<FamilyResponse>>

cancelAction

  • Cancels the user action.

    Parameters

    • actionId: string

      The action id of the action to cancel.

    • request: ActionRequest

      The action request that contains the information about the cancellation.

    Returns Promise<default<ActionResponse>>

changePassword

  • Changes a user's password using the change password Id. This usually occurs after an email has been sent to the user and they clicked on a link to reset their password.

    Parameters

    • changePasswordId: string

      The change password Id used to find the user. This value is generated by FusionAuth once the change password workflow has been initiated.

    • request: ChangePasswordRequest

      The change password request that contains all of the information used to change the password.

    Returns Promise<default<ChangePasswordResponse>>

changePasswordByIdentity

  • Changes a user's password using their identity (login id and password). Using a loginId instead of the changePasswordId bypasses the email verification and allows a password to be changed directly without first calling the #forgotPassword method.

    Parameters

    • request: ChangePasswordRequest

      The change password request that contains all of the information used to change the password.

    Returns Promise<default<void>>

commentOnUser

  • Adds a comment to the user's account.

    Parameters

    • request: UserCommentRequest

      The request object that contains all of the information used to create the user comment.

    Returns Promise<default<void>>

createAPIKey

  • Creates an API key. You can optionally specify a unique Id for the key, if not provided one will be generated. an API key can only be created with equal or lesser authority. An API key cannot create another API key unless it is granted to that API key.

    If an API key is locked to a tenant, it can only create API Keys for that same tenant.

    Parameters

    • keyId: string

      (Optional) The unique Id of the API key. If not provided a secure random Id will be generated.

    • request: APIKeyRequest

      The request object that contains all of the information needed to create the APIKey.

    Returns Promise<default<APIKeyResponse>>

createApplication

  • Creates an application. You can optionally specify an Id for the application, if not provided one will be generated.

    Parameters

    • applicationId: string

      (Optional) The Id to use for the application. If not provided a secure random UUID will be generated.

    • request: ApplicationRequest

      The request object that contains all of the information used to create the application.

    Returns Promise<default<ApplicationResponse>>

createApplicationRole

  • Creates a new role for an application. You must specify the id of the application you are creating the role for. You can optionally specify an Id for the role inside the ApplicationRole object itself, if not provided one will be generated.

    Parameters

    • applicationId: string

      The Id of the application to create the role on.

    • roleId: string

      (Optional) The Id of the role. If not provided a secure random UUID will be generated.

    • request: ApplicationRequest

      The request object that contains all of the information used to create the application role.

    Returns Promise<default<ApplicationResponse>>

createAuditLog

  • Creates an audit log with the message and user name (usually an email). Audit logs should be written anytime you make changes to the FusionAuth database. When using the FusionAuth App web interface, any changes are automatically written to the audit log. However, if you are accessing the API, you must write the audit logs yourself.

    Parameters

    • request: AuditLogRequest

      The request object that contains all of the information used to create the audit log entry.

    Returns Promise<default<AuditLogResponse>>

createConnector

  • Creates a connector. You can optionally specify an Id for the connector, if not provided one will be generated.

    Parameters

    • connectorId: string

      (Optional) The Id for the connector. If not provided a secure random UUID will be generated.

    • request: ConnectorRequest

      The request object that contains all of the information used to create the connector.

    Returns Promise<default<ConnectorResponse>>

createConsent

  • Creates a user consent type. You can optionally specify an Id for the consent type, if not provided one will be generated.

    Parameters

    • consentId: string

      (Optional) The Id for the consent. If not provided a secure random UUID will be generated.

    • request: ConsentRequest

      The request object that contains all of the information used to create the consent.

    Returns Promise<default<ConsentResponse>>

createEmailTemplate

  • Creates an email template. You can optionally specify an Id for the template, if not provided one will be generated.

    Parameters

    • emailTemplateId: string

      (Optional) The Id for the template. If not provided a secure random UUID will be generated.

    • request: EmailTemplateRequest

      The request object that contains all of the information used to create the email template.

    Returns Promise<default<EmailTemplateResponse>>

createEntity

  • Creates an Entity. You can optionally specify an Id for the Entity. If not provided one will be generated.

    Parameters

    • entityId: string

      (Optional) The Id for the Entity. If not provided a secure random UUID will be generated.

    • request: EntityRequest

      The request object that contains all of the information used to create the Entity.

    Returns Promise<default<EntityResponse>>

createEntityType

  • Creates a Entity Type. You can optionally specify an Id for the Entity Type, if not provided one will be generated.

    Parameters

    • entityTypeId: string

      (Optional) The Id for the Entity Type. If not provided a secure random UUID will be generated.

    • request: EntityTypeRequest

      The request object that contains all of the information used to create the Entity Type.

    Returns Promise<default<EntityTypeResponse>>

createEntityTypePermission

  • Creates a new permission for an entity type. You must specify the id of the entity type you are creating the permission for. You can optionally specify an Id for the permission inside the EntityTypePermission object itself, if not provided one will be generated.

    Parameters

    • entityTypeId: string

      The Id of the entity type to create the permission on.

    • permissionId: string

      (Optional) The Id of the permission. If not provided a secure random UUID will be generated.

    • request: EntityTypeRequest

      The request object that contains all of the information used to create the permission.

    Returns Promise<default<EntityTypeResponse>>

createFamily

  • Creates a family with the user id in the request as the owner and sole member of the family. You can optionally specify an id for the family, if not provided one will be generated.

    Parameters

    • familyId: string

      (Optional) The id for the family. If not provided a secure random UUID will be generated.

    • request: FamilyRequest

      The request object that contains all of the information used to create the family.

    Returns Promise<default<FamilyResponse>>

createForm

  • Creates a form. You can optionally specify an Id for the form, if not provided one will be generated.

    Parameters

    • formId: string

      (Optional) The Id for the form. If not provided a secure random UUID will be generated.

    • request: FormRequest

      The request object that contains all of the information used to create the form.

    Returns Promise<default<FormResponse>>

createFormField

  • Creates a form field. You can optionally specify an Id for the form, if not provided one will be generated.

    Parameters

    • fieldId: string

      (Optional) The Id for the form field. If not provided a secure random UUID will be generated.

    • request: FormFieldRequest

      The request object that contains all of the information used to create the form field.

    Returns Promise<default<FormFieldResponse>>

createGroup

  • Creates a group. You can optionally specify an Id for the group, if not provided one will be generated.

    Parameters

    • groupId: string

      (Optional) The Id for the group. If not provided a secure random UUID will be generated.

    • request: GroupRequest

      The request object that contains all of the information used to create the group.

    Returns Promise<default<GroupResponse>>

createGroupMembers

  • Creates a member in a group.

    Parameters

    • request: MemberRequest

      The request object that contains all of the information used to create the group member(s).

    Returns Promise<default<MemberResponse>>

createIdentityProvider

  • Creates an identity provider. You can optionally specify an Id for the identity provider, if not provided one will be generated.

    Parameters

    • identityProviderId: string

      (Optional) The Id of the identity provider. If not provided a secure random UUID will be generated.

    • request: IdentityProviderRequest

      The request object that contains all of the information used to create the identity provider.

    Returns Promise<default<IdentityProviderResponse>>

createLambda

  • Creates a Lambda. You can optionally specify an Id for the lambda, if not provided one will be generated.

    Parameters

    • lambdaId: string

      (Optional) The Id for the lambda. If not provided a secure random UUID will be generated.

    • request: LambdaRequest

      The request object that contains all of the information used to create the lambda.

    Returns Promise<default<LambdaResponse>>

createMessageTemplate

  • Creates an message template. You can optionally specify an Id for the template, if not provided one will be generated.

    Parameters

    • messageTemplateId: string

      (Optional) The Id for the template. If not provided a secure random UUID will be generated.

    • request: MessageTemplateRequest

      The request object that contains all of the information used to create the message template.

    Returns Promise<default<MessageTemplateResponse>>

createMessenger

  • Creates a messenger. You can optionally specify an Id for the messenger, if not provided one will be generated.

    Parameters

    • messengerId: string

      (Optional) The Id for the messenger. If not provided a secure random UUID will be generated.

    • request: MessengerRequest

      The request object that contains all of the information used to create the messenger.

    Returns Promise<default<MessengerResponse>>

createTenant

  • Creates a tenant. You can optionally specify an Id for the tenant, if not provided one will be generated.

    Parameters

    • tenantId: string

      (Optional) The Id for the tenant. If not provided a secure random UUID will be generated.

    • request: TenantRequest

      The request object that contains all of the information used to create the tenant.

    Returns Promise<default<TenantResponse>>

createTheme

  • Creates a Theme. You can optionally specify an Id for the theme, if not provided one will be generated.

    Parameters

    • themeId: string

      (Optional) The Id for the theme. If not provided a secure random UUID will be generated.

    • request: ThemeRequest

      The request object that contains all of the information used to create the theme.

    Returns Promise<default<ThemeResponse>>

createUser

  • Creates a user. You can optionally specify an Id for the user, if not provided one will be generated.

    Parameters

    • userId: string

      (Optional) The Id for the user. If not provided a secure random UUID will be generated.

    • request: UserRequest

      The request object that contains all of the information used to create the user.

    Returns Promise<default<UserResponse>>

createUserAction

  • Creates a user action. This action cannot be taken on a user until this call successfully returns. Anytime after that the user action can be applied to any user.

    Parameters

    • userActionId: string

      (Optional) The Id for the user action. If not provided a secure random UUID will be generated.

    • request: UserActionRequest

      The request object that contains all of the information used to create the user action.

    Returns Promise<default<UserActionResponse>>

createUserActionReason

  • Creates a user reason. This user action reason cannot be used when actioning a user until this call completes successfully. Anytime after that the user action reason can be used.

    Parameters

    • userActionReasonId: string

      (Optional) The Id for the user action reason. If not provided a secure random UUID will be generated.

    • request: UserActionReasonRequest

      The request object that contains all of the information used to create the user action reason.

    Returns Promise<default<UserActionReasonResponse>>

createUserConsent

  • Creates a single User consent.

    Parameters

    • userConsentId: string

      (Optional) The Id for the User consent. If not provided a secure random UUID will be generated.

    • request: UserConsentRequest

      The request that contains the user consent information.

    Returns Promise<default<UserConsentResponse>>

createUserLink

  • Link an external user from a 3rd party identity provider to a FusionAuth user.

    Parameters

    Returns Promise<default<IdentityProviderLinkResponse>>

createWebhook

  • Creates a webhook. You can optionally specify an Id for the webhook, if not provided one will be generated.

    Parameters

    • webhookId: string

      (Optional) The Id for the webhook. If not provided a secure random UUID will be generated.

    • request: WebhookRequest

      The request object that contains all of the information used to create the webhook.

    Returns Promise<default<WebhookResponse>>

deactivateApplication

  • deactivateApplication(applicationId: string): Promise<default<void>>
  • Deactivates the application with the given Id.

    Parameters

    • applicationId: string

      The Id of the application to deactivate.

    Returns Promise<default<void>>

deactivateReactor

  • deactivateReactor(): Promise<default<void>>
  • Deactivates the FusionAuth Reactor.

    Returns Promise<default<void>>

deactivateUser

  • deactivateUser(userId: string): Promise<default<void>>
  • Deactivates the user with the given Id.

    Parameters

    • userId: string

      The Id of the user to deactivate.

    Returns Promise<default<void>>

deactivateUserAction

  • deactivateUserAction(userActionId: string): Promise<default<void>>
  • Deactivates the user action with the given Id.

    Parameters

    • userActionId: string

      The Id of the user action to deactivate.

    Returns Promise<default<void>>

deactivateUsers

  • Deactivates the users with the given ids.

    deprecated

    This method has been renamed to deactivateUsersByIds, use that method instead.

    Parameters

    • userIds: string[]

      The ids of the users to deactivate.

    Returns Promise<default<UserDeleteResponse>>

deactivateUsersByIds

  • Deactivates the users with the given ids.

    Parameters

    • userIds: string[]

      The ids of the users to deactivate.

    Returns Promise<default<UserDeleteResponse>>

deleteAPIKey

  • deleteAPIKey(keyId: string): Promise<default<void>>
  • Deletes the API key for the given Id.

    Parameters

    • keyId: string

      The Id of the authentication API key to delete.

    Returns Promise<default<void>>

deleteApplication

  • deleteApplication(applicationId: string): Promise<default<void>>
  • Hard deletes an application. This is a dangerous operation and should not be used in most circumstances. This will delete the application, any registrations for that application, metrics and reports for the application, all the roles for the application, and any other data associated with the application. This operation could take a very long time, depending on the amount of data in your database.

    Parameters

    • applicationId: string

      The Id of the application to delete.

    Returns Promise<default<void>>

deleteApplicationRole

  • deleteApplicationRole(applicationId: string, roleId: string): Promise<default<void>>
  • Hard deletes an application role. This is a dangerous operation and should not be used in most circumstances. This permanently removes the given role from all users that had it.

    Parameters

    • applicationId: string

      The Id of the application to deactivate.

    • roleId: string

      The Id of the role to delete.

    Returns Promise<default<void>>

deleteConnector

  • deleteConnector(connectorId: string): Promise<default<void>>
  • Deletes the connector for the given Id.

    Parameters

    • connectorId: string

      The Id of the connector to delete.

    Returns Promise<default<void>>

deleteConsent

  • deleteConsent(consentId: string): Promise<default<void>>
  • Deletes the consent for the given Id.

    Parameters

    • consentId: string

      The Id of the consent to delete.

    Returns Promise<default<void>>

deleteEmailTemplate

  • deleteEmailTemplate(emailTemplateId: string): Promise<default<void>>
  • Deletes the email template for the given Id.

    Parameters

    • emailTemplateId: string

      The Id of the email template to delete.

    Returns Promise<default<void>>

deleteEntity

  • deleteEntity(entityId: string): Promise<default<void>>
  • Deletes the Entity for the given Id.

    Parameters

    • entityId: string

      The Id of the Entity to delete.

    Returns Promise<default<void>>

deleteEntityGrant

  • deleteEntityGrant(entityId: string, recipientEntityId: string, userId: string): Promise<default<void>>
  • Deletes an Entity Grant for the given User or Entity.

    Parameters

    • entityId: string

      The Id of the Entity that the Entity Grant is being deleted for.

    • recipientEntityId: string

      (Optional) The Id of the Entity that the Entity Grant is for.

    • userId: string

      (Optional) The Id of the User that the Entity Grant is for.

    Returns Promise<default<void>>

deleteEntityType

  • deleteEntityType(entityTypeId: string): Promise<default<void>>
  • Deletes the Entity Type for the given Id.

    Parameters

    • entityTypeId: string

      The Id of the Entity Type to delete.

    Returns Promise<default<void>>

deleteEntityTypePermission

  • deleteEntityTypePermission(entityTypeId: string, permissionId: string): Promise<default<void>>
  • Hard deletes a permission. This is a dangerous operation and should not be used in most circumstances. This permanently removes the given permission from all grants that had it.

    Parameters

    • entityTypeId: string

      The Id of the entityType the the permission belongs to.

    • permissionId: string

      The Id of the permission to delete.

    Returns Promise<default<void>>

deleteForm

  • deleteForm(formId: string): Promise<default<void>>
  • Deletes the form for the given Id.

    Parameters

    • formId: string

      The Id of the form to delete.

    Returns Promise<default<void>>

deleteFormField

  • deleteFormField(fieldId: string): Promise<default<void>>
  • Deletes the form field for the given Id.

    Parameters

    • fieldId: string

      The Id of the form field to delete.

    Returns Promise<default<void>>

deleteGroup

  • deleteGroup(groupId: string): Promise<default<void>>
  • Deletes the group for the given Id.

    Parameters

    • groupId: string

      The Id of the group to delete.

    Returns Promise<default<void>>

deleteGroupMembers

  • Removes users as members of a group.

    Parameters

    • request: MemberDeleteRequest

      The member request that contains all of the information used to remove members to the group.

    Returns Promise<default<void>>

deleteIdentityProvider

  • deleteIdentityProvider(identityProviderId: string): Promise<default<void>>
  • Deletes the identity provider for the given Id.

    Parameters

    • identityProviderId: string

      The Id of the identity provider to delete.

    Returns Promise<default<void>>

deleteKey

  • deleteKey(keyId: string): Promise<default<void>>
  • Deletes the key for the given Id.

    Parameters

    • keyId: string

      The Id of the key to delete.

    Returns Promise<default<void>>

deleteLambda

  • deleteLambda(lambdaId: string): Promise<default<void>>
  • Deletes the lambda for the given Id.

    Parameters

    • lambdaId: string

      The Id of the lambda to delete.

    Returns Promise<default<void>>

deleteMessageTemplate

  • deleteMessageTemplate(messageTemplateId: string): Promise<default<void>>
  • Deletes the message template for the given Id.

    Parameters

    • messageTemplateId: string

      The Id of the message template to delete.

    Returns Promise<default<void>>

deleteMessenger

  • deleteMessenger(messengerId: string): Promise<default<void>>
  • Deletes the messenger for the given Id.

    Parameters

    • messengerId: string

      The Id of the messenger to delete.

    Returns Promise<default<void>>

deleteRegistration

  • deleteRegistration(userId: string, applicationId: string): Promise<default<void>>
  • Deletes the user registration for the given user and application.

    Parameters

    • userId: string

      The Id of the user whose registration is being deleted.

    • applicationId: string

      The Id of the application to remove the registration for.

    Returns Promise<default<void>>

deleteTenant

  • deleteTenant(tenantId: string): Promise<default<void>>
  • Deletes the tenant for the given Id.

    Parameters

    • tenantId: string

      The Id of the tenant to delete.

    Returns Promise<default<void>>

deleteTenantAsync

  • deleteTenantAsync(tenantId: string): Promise<default<void>>
  • Deletes the tenant for the given Id asynchronously. This method is helpful if you do not want to wait for the delete operation to complete.

    Parameters

    • tenantId: string

      The Id of the tenant to delete.

    Returns Promise<default<void>>

deleteTheme

  • deleteTheme(themeId: string): Promise<default<void>>
  • Deletes the theme for the given Id.

    Parameters

    • themeId: string

      The Id of the theme to delete.

    Returns Promise<default<void>>

deleteUser

  • deleteUser(userId: string): Promise<default<void>>
  • Deletes the user for the given Id. This permanently deletes all information, metrics, reports and data associated with the user.

    Parameters

    • userId: string

      The Id of the user to delete.

    Returns Promise<default<void>>

deleteUserAction

  • deleteUserAction(userActionId: string): Promise<default<void>>
  • Deletes the user action for the given Id. This permanently deletes the user action and also any history and logs of the action being applied to any users.

    Parameters

    • userActionId: string

      The Id of the user action to delete.

    Returns Promise<default<void>>

deleteUserActionReason

  • deleteUserActionReason(userActionReasonId: string): Promise<default<void>>
  • Deletes the user action reason for the given Id.

    Parameters

    • userActionReasonId: string

      The Id of the user action reason to delete.

    Returns Promise<default<void>>

deleteUserLink

  • deleteUserLink(identityProviderId: string, identityProviderUserId: string, userId: string): Promise<default<IdentityProviderLinkResponse>>
  • Remove an existing link that has been made from a 3rd party identity provider to a FusionAuth user.

    Parameters

    • identityProviderId: string

      The unique Id of the identity provider.

    • identityProviderUserId: string

      The unique Id of the user in the 3rd party identity provider to unlink.

    • userId: string

      The unique Id of the FusionAuth user to unlink.

    Returns Promise<default<IdentityProviderLinkResponse>>

deleteUsers

  • Deletes the users with the given ids, or users matching the provided JSON query or queryString. The order of preference is ids, query and then queryString, it is recommended to only provide one of the three for the request.

    This method can be used to deactivate or permanently delete (hard-delete) users based upon the hardDelete boolean in the request body. Using the dryRun parameter you may also request the result of the action without actually deleting or deactivating any users.

    deprecated

    This method has been renamed to deleteUsersByQuery, use that method instead.

    Parameters

    Returns Promise<default<UserDeleteResponse>>

deleteUsersByQuery

  • Deletes the users with the given ids, or users matching the provided JSON query or queryString. The order of preference is ids, query and then queryString, it is recommended to only provide one of the three for the request.

    This method can be used to deactivate or permanently delete (hard-delete) users based upon the hardDelete boolean in the request body. Using the dryRun parameter you may also request the result of the action without actually deleting or deactivating any users.

    Parameters

    Returns Promise<default<UserDeleteResponse>>

deleteWebhook

  • deleteWebhook(webhookId: string): Promise<default<void>>
  • Deletes the webhook for the given Id.

    Parameters

    • webhookId: string

      The Id of the webhook to delete.

    Returns Promise<default<void>>

disableTwoFactor

  • disableTwoFactor(userId: string, methodId: string, code: string): Promise<default<void>>
  • Disable Two Factor authentication for a user.

    Parameters

    • userId: string

      The Id of the User for which you're disabling Two Factor authentication.

    • methodId: string

      The two-factor method identifier you wish to disable

    • code: string

      The Two Factor code used verify the the caller knows the Two Factor secret.

    Returns Promise<default<void>>

enableTwoFactor

  • Enable Two Factor authentication for a user.

    Parameters

    • userId: string

      The Id of the user to enable Two Factor authentication.

    • request: TwoFactorRequest

      The two factor enable request information.

    Returns Promise<default<TwoFactorResponse>>

exchangeOAuthCodeForAccessToken

  • exchangeOAuthCodeForAccessToken(code: string, client_id: string, client_secret: string, redirect_uri: string): Promise<default<AccessToken>>
  • Exchanges an OAuth authorization code for an access token. Makes a request to the Token endpoint to exchange the authorization code returned from the Authorize endpoint for an access token.

    Parameters

    • code: string

      The authorization code returned on the /oauth2/authorize response.

    • client_id: string

      The unique client identifier. The client Id is the Id of the FusionAuth Application in which you you are attempting to authenticate.

    • client_secret: string

      (Optional) The client secret. This value will be required if client authentication is enabled.

    • redirect_uri: string

      The URI to redirect to upon a successful request.

    Returns Promise<default<AccessToken>>

exchangeOAuthCodeForAccessTokenUsingPKCE

  • exchangeOAuthCodeForAccessTokenUsingPKCE(code: string, client_id: string, client_secret: string, redirect_uri: string, code_verifier: string): Promise<default<AccessToken>>
  • Exchanges an OAuth authorization code and code_verifier for an access token. Makes a request to the Token endpoint to exchange the authorization code returned from the Authorize endpoint and a code_verifier for an access token.

    Parameters

    • code: string

      The authorization code returned on the /oauth2/authorize response.

    • client_id: string

      (Optional) The unique client identifier. The client Id is the Id of the FusionAuth Application in which you you are attempting to authenticate. This parameter is optional when the Authorization header is provided.

    • client_secret: string

      (Optional) The client secret. This value may optionally be provided in the request body instead of the Authorization header.

    • redirect_uri: string

      The URI to redirect to upon a successful request.

    • code_verifier: string

      The random string generated previously. Will be compared with the code_challenge sent previously, which allows the OAuth provider to authenticate your app.

    Returns Promise<default<AccessToken>>

exchangeRefreshTokenForAccessToken

  • exchangeRefreshTokenForAccessToken(refresh_token: string, client_id: string, client_secret: string, scope: string, user_code: string): Promise<default<AccessToken>>
  • Exchange a Refresh Token for an Access Token. If you will be using the Refresh Token Grant, you will make a request to the Token endpoint to exchange the user’s refresh token for an access token.

    Parameters

    • refresh_token: string

      The refresh token that you would like to use to exchange for an access token.

    • client_id: string

      (Optional) The unique client identifier. The client Id is the Id of the FusionAuth Application in which you you are attempting to authenticate. This parameter is optional when the Authorization header is provided.

    • client_secret: string

      (Optional) The client secret. This value may optionally be provided in the request body instead of the Authorization header.

    • scope: string

      (Optional) This parameter is optional and if omitted, the same scope requested during the authorization request will be used. If provided the scopes must match those requested during the initial authorization request.

    • user_code: string

      (Optional) The end-user verification code. This code is required if using this endpoint to approve the Device Authorization.

    Returns Promise<default<AccessToken>>

exchangeRefreshTokenForJWT

  • Exchange a refresh token for a new JWT.

    Parameters

    Returns Promise<default<JWTRefreshResponse>>

exchangeUserCredentialsForAccessToken

  • exchangeUserCredentialsForAccessToken(username: string, password: string, client_id: string, client_secret: string, scope: string, user_code: string): Promise<default<AccessToken>>
  • Exchange User Credentials for a Token. If you will be using the Resource Owner Password Credential Grant, you will make a request to the Token endpoint to exchange the user’s email and password for an access token.

    Parameters

    • username: string

      The login identifier of the user. The login identifier can be either the email or the username.

    • password: string

      The user’s password.

    • client_id: string

      (Optional) The unique client identifier. The client Id is the Id of the FusionAuth Application in which you you are attempting to authenticate. This parameter is optional when the Authorization header is provided.

    • client_secret: string

      (Optional) The client secret. This value may optionally be provided in the request body instead of the Authorization header.

    • scope: string

      (Optional) This parameter is optional and if omitted, the same scope requested during the authorization request will be used. If provided the scopes must match those requested during the initial authorization request.

    • user_code: string

      (Optional) The end-user verification code. This code is required if using this endpoint to approve the Device Authorization.

    Returns Promise<default<AccessToken>>

forgotPassword

  • Begins the forgot password sequence, which kicks off an email to the user so that they can reset their password.

    Parameters

    • request: ForgotPasswordRequest

      The request that contains the information about the user so that they can be emailed.

    Returns Promise<default<ForgotPasswordResponse>>

generateEmailVerificationId

  • Generate a new Email Verification Id to be used with the Verify Email API. This API will not attempt to send an email to the User. This API may be used to collect the verificationId for use with a third party system.

    Parameters

    • email: string

      The email address of the user that needs a new verification email.

    Returns Promise<default<VerifyEmailResponse>>

generateKey

  • Generate a new RSA or EC key pair or an HMAC secret.

    Parameters

    • keyId: string

      (Optional) The Id for the key. If not provided a secure random UUID will be generated.

    • request: KeyRequest

      The request object that contains all of the information used to create the key.

    Returns Promise<default<KeyResponse>>

generateRegistrationVerificationId

  • Generate a new Application Registration Verification Id to be used with the Verify Registration API. This API will not attempt to send an email to the User. This API may be used to collect the verificationId for use with a third party system.

    Parameters

    • email: string

      The email address of the user that needs a new verification email.

    • applicationId: string

      The Id of the application to be verified.

    Returns Promise<default<VerifyRegistrationResponse>>

generateTwoFactorRecoveryCodes

  • Generate two-factor recovery codes for a user. Generating two-factor recovery codes will invalidate any existing recovery codes.

    Parameters

    • userId: string

      The Id of the user to generate new Two Factor recovery codes.

    Returns Promise<default<TwoFactorRecoveryCodeResponse>>

generateTwoFactorSecret

  • Generate a Two Factor secret that can be used to enable Two Factor authentication for a User. The response will contain both the secret and a Base32 encoded form of the secret which can be shown to a User when using a 2 Step Authentication application such as Google Authenticator.

    Returns Promise<default<SecretResponse>>

generateTwoFactorSecretUsingJWT

  • generateTwoFactorSecretUsingJWT(encodedJWT: string): Promise<default<SecretResponse>>
  • Generate a Two Factor secret that can be used to enable Two Factor authentication for a User. The response will contain both the secret and a Base32 encoded form of the secret which can be shown to a User when using a 2 Step Authentication application such as Google Authenticator.

    Parameters

    • encodedJWT: string

      The encoded JWT (access token).

    Returns Promise<default<SecretResponse>>

identityProviderLogin

  • Handles login via third-parties including Social login, external OAuth and OpenID Connect, and other login systems.

    Parameters

    • request: IdentityProviderLoginRequest

      The third-party login request that contains information from the third-party login providers that FusionAuth uses to reconcile the user's account.

    Returns Promise<default<LoginResponse>>

importKey

  • Import an existing RSA or EC key pair or an HMAC secret.

    Parameters

    • keyId: string

      (Optional) The Id for the key. If not provided a secure random UUID will be generated.

    • request: KeyRequest

      The request object that contains all of the information used to create the key.

    Returns Promise<default<KeyResponse>>

importRefreshTokens

  • Bulk imports refresh tokens. This request performs minimal validation and runs batch inserts of refresh tokens with the expectation that each token represents a user that already exists and is registered for the corresponding FusionAuth Application. This is done to increases the insert performance.

    Therefore, if you encounter an error due to a database key violation, the response will likely offer a generic explanation. If you encounter an error, you may optionally enable additional validation to receive a JSON response body with specific validation errors. This will slow the request down but will allow you to identify the cause of the failure. See the validateDbConstraints request parameter.

    Parameters

    • request: RefreshTokenImportRequest

      The request that contains all of the information about all of the refresh tokens to import.

    Returns Promise<default<void>>

importUsers

  • Bulk imports users. This request performs minimal validation and runs batch inserts of users with the expectation that each user does not yet exist and each registration corresponds to an existing FusionAuth Application. This is done to increases the insert performance.

    Therefore, if you encounter an error due to a database key violation, the response will likely offer a generic explanation. If you encounter an error, you may optionally enable additional validation to receive a JSON response body with specific validation errors. This will slow the request down but will allow you to identify the cause of the failure. See the validateDbConstraints request parameter.

    Parameters

    • request: ImportRequest

      The request that contains all of the information about all of the users to import.

    Returns Promise<default<void>>

introspectAccessToken

  • introspectAccessToken(client_id: string, token: string): Promise<default<IntrospectResponse>>
  • Inspect an access token issued by FusionAuth.

    Parameters

    • client_id: string

      The unique client identifier. The client Id is the Id of the FusionAuth Application for which this token was generated.

    • token: string

      The access token returned by this OAuth provider as the result of a successful authentication.

    Returns Promise<default<IntrospectResponse>>

issueJWT

  • issueJWT(applicationId: string, encodedJWT: string, refreshToken: string): Promise<default<IssueResponse>>
  • Issue a new access token (JWT) for the requested Application after ensuring the provided JWT is valid. A valid access token is properly signed and not expired.

    This API may be used in an SSO configuration to issue new tokens for another application after the user has obtained a valid token from authentication.

    Parameters

    • applicationId: string

      The Application Id for which you are requesting a new access token be issued.

    • encodedJWT: string

      The encoded JWT (access token).

    • refreshToken: string

      (Optional) An existing refresh token used to request a refresh token in addition to a JWT in the response.

      The target application represented by the applicationId request parameter must have refresh tokens enabled in order to receive a refresh token in the response.

    Returns Promise<default<IssueResponse>>

login

  • Authenticates a user to FusionAuth.

    This API optionally requires an API key. See Application.loginConfiguration.requireAuthentication.

    Parameters

    • request: LoginRequest

      The login request that contains the user credentials used to log them in.

    Returns Promise<default<LoginResponse>>

loginPing

  • loginPing(userId: string, applicationId: string, callerIPAddress: string): Promise<default<LoginResponse>>
  • Sends a ping to FusionAuth indicating that the user was automatically logged into an application. When using FusionAuth's SSO or your own, you should call this if the user is already logged in centrally, but accesses an application where they no longer have a session. This helps correctly track login counts, times and helps with reporting.

    Parameters

    • userId: string

      The Id of the user that was logged in.

    • applicationId: string

      The Id of the application that they logged into.

    • callerIPAddress: string

      (Optional) The IP address of the end-user that is logging in. If a null value is provided the IP address will be that of the client or last proxy that sent the request.

    Returns Promise<default<LoginResponse>>

logout

  • logout(global: boolean, refreshToken: string): Promise<default<void>>
  • The Logout API is intended to be used to remove the refresh token and access token cookies if they exist on the client and revoke the refresh token stored. This API does nothing if the request does not contain an access token or refresh token cookies.

    Parameters

    • global: boolean

      When this value is set to true all of the refresh tokens issued to the owner of the provided token will be revoked.

    • refreshToken: string

      (Optional) The refresh_token as a request parameter instead of coming in via a cookie. If provided this takes precedence over the cookie.

    Returns Promise<default<void>>

lookupIdentityProvider

  • lookupIdentityProvider(domain: string): Promise<default<LookupResponse>>
  • Retrieves the identity provider for the given domain. A 200 response code indicates the domain is managed by a registered identity provider. A 404 indicates the domain is not managed.

    Parameters

    • domain: string

      The domain or email address to lookup.

    Returns Promise<default<LookupResponse>>

modifyAction

  • Modifies a temporal user action by changing the expiration of the action and optionally adding a comment to the action.

    Parameters

    • actionId: string

      The Id of the action to modify. This is technically the user action log id.

    • request: ActionRequest

      The request that contains all of the information about the modification.

    Returns Promise<default<ActionResponse>>

passwordlessLogin

  • Complete a login request using a passwordless code

    Parameters

    • request: PasswordlessLoginRequest

      The passwordless login request that contains all of the information used to complete login.

    Returns Promise<default<LoginResponse>>

patchAPIKey

  • Updates an authentication API key by given id

    Parameters

    • keyId: string

      The Id of the authentication key. If not provided a secure random api key will be generated.

    • request: APIKeyRequest

      The request object that contains all of the information needed to create the APIKey.

    Returns Promise<default<APIKeyResponse>>

patchApplication

  • Updates, via PATCH, the application with the given Id.

    Parameters

    • applicationId: string

      The Id of the application to update.

    • request: ApplicationRequest

      The request that contains just the new application information.

    Returns Promise<default<ApplicationResponse>>

patchApplicationRole

  • Updates, via PATCH, the application role with the given id for the application.

    Parameters

    • applicationId: string

      The Id of the application that the role belongs to.

    • roleId: string

      The Id of the role to update.

    • request: ApplicationRequest

      The request that contains just the new role information.

    Returns Promise<default<ApplicationResponse>>

patchConnector

  • Updates, via PATCH, the connector with the given Id.

    Parameters

    • connectorId: string

      The Id of the connector to update.

    • request: ConnectorRequest

      The request that contains just the new connector information.

    Returns Promise<default<ConnectorResponse>>

patchConsent

  • Updates, via PATCH, the consent with the given Id.

    Parameters

    • consentId: string

      The Id of the consent to update.

    • request: ConsentRequest

      The request that contains just the new consent information.

    Returns Promise<default<ConsentResponse>>

patchEmailTemplate

  • Updates, via PATCH, the email template with the given Id.

    Parameters

    • emailTemplateId: string

      The Id of the email template to update.

    • request: EmailTemplateRequest

      The request that contains just the new email template information.

    Returns Promise<default<EmailTemplateResponse>>

patchEntityType

  • Updates, via PATCH, the Entity Type with the given Id.

    Parameters

    • entityTypeId: string

      The Id of the Entity Type to update.

    • request: EntityTypeRequest

      The request that contains just the new Entity Type information.

    Returns Promise<default<EntityTypeResponse>>

patchGroup

  • Updates, via PATCH, the group with the given Id.

    Parameters

    • groupId: string

      The Id of the group to update.

    • request: GroupRequest

      The request that contains just the new group information.

    Returns Promise<default<GroupResponse>>

patchIdentityProvider

  • Updates, via PATCH, the identity provider with the given Id.

    Parameters

    • identityProviderId: string

      The Id of the identity provider to update.

    • request: IdentityProviderRequest

      The request object that contains just the updated identity provider information.

    Returns Promise<default<IdentityProviderResponse>>

patchIntegrations

  • Updates, via PATCH, the available integrations.

    Parameters

    • request: IntegrationRequest

      The request that contains just the new integration information.

    Returns Promise<default<IntegrationResponse>>

patchLambda

  • Updates, via PATCH, the lambda with the given Id.

    Parameters

    • lambdaId: string

      The Id of the lambda to update.

    • request: LambdaRequest

      The request that contains just the new lambda information.

    Returns Promise<default<LambdaResponse>>

patchMessageTemplate

  • Updates, via PATCH, the message template with the given Id.

    Parameters

    • messageTemplateId: string

      The Id of the message template to update.

    • request: MessageTemplateRequest

      The request that contains just the new message template information.

    Returns Promise<default<MessageTemplateResponse>>

patchMessenger

  • Updates, via PATCH, the messenger with the given Id.

    Parameters

    • messengerId: string

      The Id of the messenger to update.

    • request: MessengerRequest

      The request that contains just the new messenger information.

    Returns Promise<default<MessengerResponse>>

patchRegistration

  • Updates, via PATCH, the registration for the user with the given id and the application defined in the request.

    Parameters

    • userId: string

      The Id of the user whose registration is going to be updated.

    • request: RegistrationRequest

      The request that contains just the new registration information.

    Returns Promise<default<RegistrationResponse>>

patchSystemConfiguration

patchTenant

  • Updates, via PATCH, the tenant with the given Id.

    Parameters

    • tenantId: string

      The Id of the tenant to update.

    • request: TenantRequest

      The request that contains just the new tenant information.

    Returns Promise<default<TenantResponse>>

patchTheme

  • Updates, via PATCH, the theme with the given Id.

    Parameters

    • themeId: string

      The Id of the theme to update.

    • request: ThemeRequest

      The request that contains just the new theme information.

    Returns Promise<default<ThemeResponse>>

patchUser

  • Updates, via PATCH, the user with the given Id.

    Parameters

    • userId: string

      The Id of the user to update.

    • request: UserRequest

      The request that contains just the new user information.

    Returns Promise<default<UserResponse>>

patchUserAction

  • Updates, via PATCH, the user action with the given Id.

    Parameters

    • userActionId: string

      The Id of the user action to update.

    • request: UserActionRequest

      The request that contains just the new user action information.

    Returns Promise<default<UserActionResponse>>

patchUserActionReason

  • Updates, via PATCH, the user action reason with the given Id.

    Parameters

    • userActionReasonId: string

      The Id of the user action reason to update.

    • request: UserActionReasonRequest

      The request that contains just the new user action reason information.

    Returns Promise<default<UserActionReasonResponse>>

patchUserConsent

  • Updates, via PATCH, a single User consent by Id.

    Parameters

    • userConsentId: string

      The User Consent Id

    • request: UserConsentRequest

      The request that contains just the new user consent information.

    Returns Promise<default<UserConsentResponse>>

reactivateApplication

  • Reactivates the application with the given Id.

    Parameters

    • applicationId: string

      The Id of the application to reactivate.

    Returns Promise<default<ApplicationResponse>>

reactivateUser

  • reactivateUser(userId: string): Promise<default<UserResponse>>
  • Reactivates the user with the given Id.

    Parameters

    • userId: string

      The Id of the user to reactivate.

    Returns Promise<default<UserResponse>>

reactivateUserAction

  • Reactivates the user action with the given Id.

    Parameters

    • userActionId: string

      The Id of the user action to reactivate.

    Returns Promise<default<UserActionResponse>>

reconcileJWT

  • Reconcile a User to FusionAuth using JWT issued from another Identity Provider.

    Parameters

    Returns Promise<default<LoginResponse>>

refreshEntitySearchIndex

  • refreshEntitySearchIndex(): Promise<default<void>>
  • Request a refresh of the Entity search index. This API is not generally necessary and the search index will become consistent in a reasonable amount of time. There may be scenarios where you may wish to manually request an index refresh. One example may be if you are using the Search API or Delete Tenant API immediately following a Entity Create etc, you may wish to request a refresh to ensure the index immediately current before making a query request to the search index.

    Returns Promise<default<void>>

refreshUserSearchIndex

  • refreshUserSearchIndex(): Promise<default<void>>
  • Request a refresh of the User search index. This API is not generally necessary and the search index will become consistent in a reasonable amount of time. There may be scenarios where you may wish to manually request an index refresh. One example may be if you are using the Search API or Delete Tenant API immediately following a User Create etc, you may wish to request a refresh to ensure the index immediately current before making a query request to the search index.

    Returns Promise<default<void>>

regenerateReactorKeys

  • regenerateReactorKeys(): Promise<default<void>>
  • Regenerates any keys that are used by the FusionAuth Reactor.

    Returns Promise<default<void>>

register

  • Registers a user for an application. If you provide the User and the UserRegistration object on this request, it will create the user as well as register them for the application. This is called a Full Registration. However, if you only provide the UserRegistration object, then the user must already exist and they will be registered for the application. The user id can also be provided and it will either be used to look up an existing user or it will be used for the newly created User.

    Parameters

    • userId: string

      (Optional) The Id of the user being registered for the application and optionally created.

    • request: RegistrationRequest

      The request that optionally contains the User and must contain the UserRegistration.

    Returns Promise<default<RegistrationResponse>>

reindex

  • Requests Elasticsearch to delete and rebuild the index for FusionAuth users or entities. Be very careful when running this request as it will increase the CPU and I/O load on your database until the operation completes. Generally speaking you do not ever need to run this operation unless instructed by FusionAuth support, or if you are migrating a database another system and you are not brining along the Elasticsearch index.

    You have been warned.

    Parameters

    Returns Promise<default<void>>

removeUserFromFamily

  • removeUserFromFamily(familyId: string, userId: string): Promise<default<void>>
  • Removes a user from the family with the given id.

    Parameters

    • familyId: string

      The id of the family to remove the user from.

    • userId: string

      The id of the user to remove from the family.

    Returns Promise<default<void>>

resendEmailVerification

  • Re-sends the verification email to the user.

    Parameters

    • email: string

      The email address of the user that needs a new verification email.

    Returns Promise<default<VerifyEmailResponse>>

resendEmailVerificationWithApplicationTemplate

  • resendEmailVerificationWithApplicationTemplate(applicationId: string, email: string): Promise<default<VerifyEmailResponse>>
  • Re-sends the verification email to the user. If the Application has configured a specific email template this will be used instead of the tenant configuration.

    Parameters

    • applicationId: string

      The unique Application Id to used to resolve an application specific email template.

    • email: string

      The email address of the user that needs a new verification email.

    Returns Promise<default<VerifyEmailResponse>>

resendRegistrationVerification

  • Re-sends the application registration verification email to the user.

    Parameters

    • email: string

      The email address of the user that needs a new verification email.

    • applicationId: string

      The Id of the application to be verified.

    Returns Promise<default<VerifyRegistrationResponse>>

retrieveAPIKey

  • Retrieves an authentication API key for the given id

    Parameters

    • keyId: string

      The Id of the API key to retrieve.

    Returns Promise<default<APIKeyResponse>>

retrieveAction

  • Retrieves a single action log (the log of a user action that was taken on a user previously) for the given Id.

    Parameters

    • actionId: string

      The Id of the action to retrieve.

    Returns Promise<default<ActionResponse>>

retrieveActions

  • Retrieves all of the actions for the user with the given Id. This will return all time based actions that are active, and inactive as well as non-time based actions.

    Parameters

    • userId: string

      The Id of the user to fetch the actions for.

    Returns Promise<default<ActionResponse>>

retrieveActionsPreventingLogin

  • retrieveActionsPreventingLogin(userId: string): Promise<default<ActionResponse>>
  • Retrieves all of the actions for the user with the given Id that are currently preventing the User from logging in.

    Parameters

    • userId: string

      The Id of the user to fetch the actions for.

    Returns Promise<default<ActionResponse>>

retrieveActiveActions

  • retrieveActiveActions(userId: string): Promise<default<ActionResponse>>
  • Retrieves all of the actions for the user with the given Id that are currently active. An active action means one that is time based and has not been canceled, and has not ended.

    Parameters

    • userId: string

      The Id of the user to fetch the actions for.

    Returns Promise<default<ActionResponse>>

retrieveApplication

  • Retrieves the application for the given id or all of the applications if the id is null.

    Parameters

    • applicationId: string

      (Optional) The application id.

    Returns Promise<default<ApplicationResponse>>

retrieveApplications

  • Retrieves all of the applications.

    Returns Promise<default<ApplicationResponse>>

retrieveAuditLog

  • Retrieves a single audit log for the given Id.

    Parameters

    • auditLogId: number

      The Id of the audit log to retrieve.

    Returns Promise<default<AuditLogResponse>>

retrieveConnector

  • Retrieves the connector with the given Id.

    Parameters

    • connectorId: string

      The Id of the connector.

    Returns Promise<default<ConnectorResponse>>

retrieveConnectors

  • Retrieves all of the connectors.

    Returns Promise<default<ConnectorResponse>>

retrieveConsent

  • Retrieves the Consent for the given Id.

    Parameters

    • consentId: string

      The Id of the consent.

    Returns Promise<default<ConsentResponse>>

retrieveConsents

  • Retrieves all of the consent.

    Returns Promise<default<ConsentResponse>>

retrieveDailyActiveReport

  • Retrieves the daily active user report between the two instants. If you specify an application id, it will only return the daily active counts for that application.

    Parameters

    • applicationId: string

      (Optional) The application id.

    • start: number

      The start instant as UTC milliseconds since Epoch.

    • end: number

      The end instant as UTC milliseconds since Epoch.

    Returns Promise<default<DailyActiveUserReportResponse>>

retrieveEmailTemplate

  • Retrieves the email template for the given Id. If you don't specify the id, this will return all of the email templates.

    Parameters

    • emailTemplateId: string

      (Optional) The Id of the email template.

    Returns Promise<default<EmailTemplateResponse>>

retrieveEmailTemplatePreview

  • Creates a preview of the email template provided in the request. This allows you to preview an email template that hasn't been saved to the database yet. The entire email template does not need to be provided on the request. This will create the preview based on whatever is given.

    Parameters

    • request: PreviewRequest

      The request that contains the email template and optionally a locale to render it in.

    Returns Promise<default<PreviewResponse>>

retrieveEmailTemplates

  • Retrieves all of the email templates.

    Returns Promise<default<EmailTemplateResponse>>

retrieveEntity

  • Retrieves the Entity for the given Id.

    Parameters

    • entityId: string

      The Id of the Entity.

    Returns Promise<default<EntityResponse>>

retrieveEntityGrant

  • retrieveEntityGrant(entityId: string, recipientEntityId: string, userId: string): Promise<default<EntityGrantResponse>>
  • Retrieves an Entity Grant for the given Entity and User/Entity.

    Parameters

    • entityId: string

      The Id of the Entity.

    • recipientEntityId: string

      (Optional) The Id of the Entity that the Entity Grant is for.

    • userId: string

      (Optional) The Id of the User that the Entity Grant is for.

    Returns Promise<default<EntityGrantResponse>>

retrieveEntityType

  • Retrieves the Entity Type for the given Id.

    Parameters

    • entityTypeId: string

      The Id of the Entity Type.

    Returns Promise<default<EntityTypeResponse>>

retrieveEntityTypes

  • Retrieves all of the Entity Types.

    Returns Promise<default<EntityTypeResponse>>

retrieveEventLog

  • Retrieves a single event log for the given Id.

    Parameters

    • eventLogId: number

      The Id of the event log to retrieve.

    Returns Promise<default<EventLogResponse>>

retrieveFamilies

  • Retrieves all of the families that a user belongs to.

    Parameters

    • userId: string

      The User's id

    Returns Promise<default<FamilyResponse>>

retrieveFamilyMembersByFamilyId

  • retrieveFamilyMembersByFamilyId(familyId: string): Promise<default<FamilyResponse>>
  • Retrieves all of the members of a family by the unique Family Id.

    Parameters

    • familyId: string

      The unique Id of the Family.

    Returns Promise<default<FamilyResponse>>

retrieveForm

  • retrieveForm(formId: string): Promise<default<FormResponse>>
  • Retrieves the form with the given Id.

    Parameters

    • formId: string

      The Id of the form.

    Returns Promise<default<FormResponse>>

retrieveFormField

  • Retrieves the form field with the given Id.

    Parameters

    • fieldId: string

      The Id of the form field.

    Returns Promise<default<FormFieldResponse>>

retrieveFormFields

  • Retrieves all of the forms fields

    Returns Promise<default<FormFieldResponse>>

retrieveForms

  • Retrieves all of the forms.

    Returns Promise<default<FormResponse>>

retrieveGroup

  • retrieveGroup(groupId: string): Promise<default<GroupResponse>>
  • Retrieves the group for the given Id.

    Parameters

    • groupId: string

      The Id of the group.

    Returns Promise<default<GroupResponse>>

retrieveGroups

  • Retrieves all of the groups.

    Returns Promise<default<GroupResponse>>

retrieveIdentityProvider

  • Retrieves the identity provider for the given id or all of the identity providers if the id is null.

    Parameters

    • identityProviderId: string

      The identity provider Id.

    Returns Promise<default<IdentityProviderResponse>>

retrieveIdentityProviderByType

  • Retrieves one or more identity provider for the given type. For types such as Google, Facebook, Twitter and LinkedIn, only a single identity provider can exist. For types such as OpenID Connect and SAMLv2 more than one identity provider can be configured so this request may return multiple identity providers.

    Parameters

    Returns Promise<default<IdentityProviderResponse>>

retrieveIdentityProviders

  • Retrieves all of the identity providers.

    Returns Promise<default<IdentityProviderResponse>>

retrieveInactiveActions

  • retrieveInactiveActions(userId: string): Promise<default<ActionResponse>>
  • Retrieves all of the actions for the user with the given Id that are currently inactive. An inactive action means one that is time based and has been canceled or has expired, or is not time based.

    Parameters

    • userId: string

      The Id of the user to fetch the actions for.

    Returns Promise<default<ActionResponse>>

retrieveInactiveApplications

  • Retrieves all of the applications that are currently inactive.

    Returns Promise<default<ApplicationResponse>>

retrieveInactiveUserActions

  • Retrieves all of the user actions that are currently inactive.

    Returns Promise<default<UserActionResponse>>

retrieveIntegration

  • Retrieves the available integrations.

    Returns Promise<default<IntegrationResponse>>

retrieveJWTPublicKey

  • Retrieves the Public Key configured for verifying JSON Web Tokens (JWT) by the key Id (kid).

    Parameters

    • keyId: string

      The Id of the public key (kid).

    Returns Promise<default<PublicKeyResponse>>

retrieveJWTPublicKeyByApplicationId

  • retrieveJWTPublicKeyByApplicationId(applicationId: string): Promise<default<PublicKeyResponse>>
  • Retrieves the Public Key configured for verifying the JSON Web Tokens (JWT) issued by the Login API by the Application Id.

    Parameters

    • applicationId: string

      The Id of the Application for which this key is used.

    Returns Promise<default<PublicKeyResponse>>

retrieveJWTPublicKeys

  • Retrieves all Public Keys configured for verifying JSON Web Tokens (JWT).

    Returns Promise<default<PublicKeyResponse>>

retrieveJsonWebKeySet

  • Returns public keys used by FusionAuth to cryptographically verify JWTs using the JSON Web Key format.

    Returns Promise<default<JWKSResponse>>

retrieveKey

  • retrieveKey(keyId: string): Promise<default<KeyResponse>>
  • Retrieves the key for the given Id.

    Parameters

    • keyId: string

      The Id of the key.

    Returns Promise<default<KeyResponse>>

retrieveKeys

  • Retrieves all of the keys.

    Returns Promise<default<KeyResponse>>

retrieveLambda

  • Retrieves the lambda for the given Id.

    Parameters

    • lambdaId: string

      The Id of the lambda.

    Returns Promise<default<LambdaResponse>>

retrieveLambdas

  • Retrieves all of the lambdas.

    Returns Promise<default<LambdaResponse>>

retrieveLambdasByType

  • Retrieves all of the lambdas for the provided type.

    Parameters

    • type: LambdaType

      The type of the lambda to return.

    Returns Promise<default<LambdaResponse>>

retrieveLoginReport

  • retrieveLoginReport(applicationId: string, start: number, end: number): Promise<default<LoginReportResponse>>
  • Retrieves the login report between the two instants. If you specify an application id, it will only return the login counts for that application.

    Parameters

    • applicationId: string

      (Optional) The application id.

    • start: number

      The start instant as UTC milliseconds since Epoch.

    • end: number

      The end instant as UTC milliseconds since Epoch.

    Returns Promise<default<LoginReportResponse>>

retrieveMessageTemplate

  • Retrieves the message template for the given Id. If you don't specify the id, this will return all of the message templates.

    Parameters

    • messageTemplateId: string

      (Optional) The Id of the message template.

    Returns Promise<default<MessageTemplateResponse>>

retrieveMessageTemplatePreview

  • Creates a preview of the message template provided in the request, normalized to a given locale.

    Parameters

    Returns Promise<default<PreviewMessageTemplateResponse>>

retrieveMessageTemplates

  • Retrieves all of the message templates.

    Returns Promise<default<MessageTemplateResponse>>

retrieveMessenger

  • Retrieves the messenger with the given Id.

    Parameters

    • messengerId: string

      The Id of the messenger.

    Returns Promise<default<MessengerResponse>>

retrieveMessengers

  • Retrieves all of the messengers.

    Returns Promise<default<MessengerResponse>>

retrieveMonthlyActiveReport

  • Retrieves the monthly active user report between the two instants. If you specify an application id, it will only return the monthly active counts for that application.

    Parameters

    • applicationId: string

      (Optional) The application id.

    • start: number

      The start instant as UTC milliseconds since Epoch.

    • end: number

      The end instant as UTC milliseconds since Epoch.

    Returns Promise<default<MonthlyActiveUserReportResponse>>

retrieveOauthConfiguration

  • Retrieves the Oauth2 configuration for the application for the given Application Id.

    Parameters

    • applicationId: string

      The Id of the Application to retrieve OAuth configuration.

    Returns Promise<default<OAuthConfigurationResponse>>

retrieveOpenIdConfiguration

  • Returns the well known OpenID Configuration JSON document

    Returns Promise<default<OpenIdConfiguration>>

retrievePasswordValidationRules

  • Retrieves the password validation rules for a specific tenant. This method requires a tenantId to be provided through the use of a Tenant scoped API key or an HTTP header X-FusionAuth-TenantId to specify the Tenant Id.

    This API does not require an API key.

    Returns Promise<default<PasswordValidationRulesResponse>>

retrievePasswordValidationRulesWithTenantId

  • Retrieves the password validation rules for a specific tenant.

    This API does not require an API key.

    Parameters

    • tenantId: string

      The Id of the tenant.

    Returns Promise<default<PasswordValidationRulesResponse>>

retrievePendingChildren

  • retrievePendingChildren(parentEmail: string): Promise<default<PendingResponse>>
  • Retrieves all of the children for the given parent email address.

    Parameters

    • parentEmail: string

      The email of the parent.

    Returns Promise<default<PendingResponse>>

retrieveReactorStatus

  • Retrieves the FusionAuth Reactor status.

    Returns Promise<default<ReactorResponse>>

retrieveRecentLogins

  • Retrieves the last number of login records.

    Parameters

    • offset: number

      The initial record. e.g. 0 is the last login, 100 will be the 100th most recent login.

    • limit: number

      (Optional, defaults to 10) The number of records to retrieve.

    Returns Promise<default<RecentLoginResponse>>

retrieveRefreshTokenById

  • Retrieves a single refresh token by unique Id. This is not the same thing as the string value of the refresh token, if you have that, you already have what you need..

    Parameters

    • userId: string

      The Id of the user.

    Returns Promise<default<RefreshTokenResponse>>

retrieveRefreshTokens

  • Retrieves the refresh tokens that belong to the user with the given Id.

    Parameters

    • userId: string

      The Id of the user.

    Returns Promise<default<RefreshTokenResponse>>

retrieveRegistration

  • retrieveRegistration(userId: string, applicationId: string): Promise<default<RegistrationResponse>>
  • Retrieves the user registration for the user with the given id and the given application id.

    Parameters

    • userId: string

      The Id of the user.

    • applicationId: string

      The Id of the application.

    Returns Promise<default<RegistrationResponse>>

retrieveRegistrationReport

  • Retrieves the registration report between the two instants. If you specify an application id, it will only return the registration counts for that application.

    Parameters

    • applicationId: string

      (Optional) The application id.

    • start: number

      The start instant as UTC milliseconds since Epoch.

    • end: number

      The end instant as UTC milliseconds since Epoch.

    Returns Promise<default<RegistrationReportResponse>>

retrieveReindexStatus

  • retrieveReindexStatus(): Promise<default<void>>
  • Retrieve the status of a re-index process. A status code of 200 indicates the re-index is in progress, a status code of 404 indicates no re-index is in progress.

    Returns Promise<default<void>>

retrieveSystemConfiguration

retrieveTenant

  • Retrieves the tenant for the given Id.

    Parameters

    • tenantId: string

      The Id of the tenant.

    Returns Promise<default<TenantResponse>>

retrieveTenants

  • Retrieves all of the tenants.

    Returns Promise<default<TenantResponse>>

retrieveTheme

  • retrieveTheme(themeId: string): Promise<default<ThemeResponse>>
  • Retrieves the theme for the given Id.

    Parameters

    • themeId: string

      The Id of the theme.

    Returns Promise<default<ThemeResponse>>

retrieveThemes

  • Retrieves all of the themes.

    Returns Promise<default<ThemeResponse>>

retrieveTotalReport

  • Retrieves the totals report. This contains all of the total counts for each application and the global registration count.

    Returns Promise<default<TotalsReportResponse>>

retrieveTwoFactorRecoveryCodes

  • Retrieve two-factor recovery codes for a user.

    Parameters

    • userId: string

      The Id of the user to retrieve Two Factor recovery codes.

    Returns Promise<default<TwoFactorRecoveryCodeResponse>>

retrieveUser

  • retrieveUser(userId: string): Promise<default<UserResponse>>
  • Retrieves the user for the given Id.

    Parameters

    • userId: string

      The Id of the user.

    Returns Promise<default<UserResponse>>

retrieveUserAction

  • Retrieves the user action for the given Id. If you pass in null for the id, this will return all of the user actions.

    Parameters

    • userActionId: string

      (Optional) The Id of the user action.

    Returns Promise<default<UserActionResponse>>

retrieveUserActionReason

  • Retrieves the user action reason for the given Id. If you pass in null for the id, this will return all of the user action reasons.

    Parameters

    • userActionReasonId: string

      (Optional) The Id of the user action reason.

    Returns Promise<default<UserActionReasonResponse>>

retrieveUserActionReasons

  • Retrieves all the user action reasons.

    Returns Promise<default<UserActionReasonResponse>>

retrieveUserActions

  • Retrieves all of the user actions.

    Returns Promise<default<UserActionResponse>>

retrieveUserByChangePasswordId

  • retrieveUserByChangePasswordId(changePasswordId: string): Promise<default<UserResponse>>
  • Retrieves the user by a change password Id. The intended use of this API is to retrieve a user after the forgot password workflow has been initiated and you may not know the user's email or username.

    Parameters

    • changePasswordId: string

      The unique change password Id that was sent via email or returned by the Forgot Password API.

    Returns Promise<default<UserResponse>>

retrieveUserByEmail

  • retrieveUserByEmail(email: string): Promise<default<UserResponse>>
  • Retrieves the user for the given email.

    Parameters

    • email: string

      The email of the user.

    Returns Promise<default<UserResponse>>

retrieveUserByLoginId

  • retrieveUserByLoginId(loginId: string): Promise<default<UserResponse>>
  • Retrieves the user for the loginId. The loginId can be either the username or the email.

    Parameters

    • loginId: string

      The email or username of the user.

    Returns Promise<default<UserResponse>>

retrieveUserByUsername

  • retrieveUserByUsername(username: string): Promise<default<UserResponse>>
  • Retrieves the user for the given username.

    Parameters

    • username: string

      The username of the user.

    Returns Promise<default<UserResponse>>

retrieveUserByVerificationId

  • retrieveUserByVerificationId(verificationId: string): Promise<default<UserResponse>>
  • Retrieves the user by a verificationId. The intended use of this API is to retrieve a user after the forgot password workflow has been initiated and you may not know the user's email or username.

    Parameters

    • verificationId: string

      The unique verification Id that has been set on the user object.

    Returns Promise<default<UserResponse>>

retrieveUserComments

  • Retrieves all of the comments for the user with the given Id.

    Parameters

    • userId: string

      The Id of the user.

    Returns Promise<default<UserCommentResponse>>

retrieveUserConsent

  • Retrieve a single User consent by Id.

    Parameters

    • userConsentId: string

      The User consent Id

    Returns Promise<default<UserConsentResponse>>

retrieveUserConsents

  • Retrieves all of the consents for a User.

    Parameters

    • userId: string

      The User's Id

    Returns Promise<default<UserConsentResponse>>

retrieveUserInfoFromAccessToken

  • retrieveUserInfoFromAccessToken(encodedJWT: string): Promise<default<UserResponse>>
  • Call the UserInfo endpoint to retrieve User Claims from the access token issued by FusionAuth.

    Parameters

    • encodedJWT: string

      The encoded JWT (access token).

    Returns Promise<default<UserResponse>>

retrieveUserLink

  • retrieveUserLink(identityProviderId: string, identityProviderUserId: string, userId: string): Promise<default<IdentityProviderLinkResponse>>
  • Retrieve a single Identity Provider user (link).

    Parameters

    • identityProviderId: string

      The unique Id of the identity provider.

    • identityProviderUserId: string

      The unique Id of the user in the 3rd party identity provider.

    • userId: string

      The unique Id of the FusionAuth user.

    Returns Promise<default<IdentityProviderLinkResponse>>

retrieveUserLinksByUserId

  • Retrieve all Identity Provider users (links) for the user. Specify the optional identityProviderId to retrieve links for a particular IdP.

    Parameters

    • identityProviderId: string

      (Optional) The unique Id of the identity provider. Specify this value to reduce the links returned to those for a particular IdP.

    • userId: string

      The unique Id of the user.

    Returns Promise<default<IdentityProviderLinkResponse>>

retrieveUserLoginReport

  • retrieveUserLoginReport(applicationId: string, userId: string, start: number, end: number): Promise<default<LoginReportResponse>>
  • Retrieves the login report between the two instants for a particular user by Id. If you specify an application id, it will only return the login counts for that application.

    Parameters

    • applicationId: string

      (Optional) The application id.

    • userId: string

      The userId id.

    • start: number

      The start instant as UTC milliseconds since Epoch.

    • end: number

      The end instant as UTC milliseconds since Epoch.

    Returns Promise<default<LoginReportResponse>>

retrieveUserLoginReportByLoginId

  • retrieveUserLoginReportByLoginId(applicationId: string, loginId: string, start: number, end: number): Promise<default<LoginReportResponse>>
  • Retrieves the login report between the two instants for a particular user by login Id. If you specify an application id, it will only return the login counts for that application.

    Parameters

    • applicationId: string

      (Optional) The application id.

    • loginId: string

      The userId id.

    • start: number

      The start instant as UTC milliseconds since Epoch.

    • end: number

      The end instant as UTC milliseconds since Epoch.

    Returns Promise<default<LoginReportResponse>>

retrieveUserRecentLogins

  • retrieveUserRecentLogins(userId: string, offset: number, limit: number): Promise<default<RecentLoginResponse>>
  • Retrieves the last number of login records for a user.

    Parameters

    • userId: string

      The Id of the user.

    • offset: number

      The initial record. e.g. 0 is the last login, 100 will be the 100th most recent login.

    • limit: number

      (Optional, defaults to 10) The number of records to retrieve.

    Returns Promise<default<RecentLoginResponse>>

retrieveUserUsingJWT

  • retrieveUserUsingJWT(encodedJWT: string): Promise<default<UserResponse>>
  • Retrieves the user for the given Id. This method does not use an API key, instead it uses a JSON Web Token (JWT) for authentication.

    Parameters

    • encodedJWT: string

      The encoded JWT (access token).

    Returns Promise<default<UserResponse>>

retrieveVersion

  • Retrieves the FusionAuth version string.

    Returns Promise<default<VersionResponse>>

retrieveWebhook

  • Retrieves the webhook for the given Id. If you pass in null for the id, this will return all the webhooks.

    Parameters

    • webhookId: string

      (Optional) The Id of the webhook.

    Returns Promise<default<WebhookResponse>>

retrieveWebhooks

  • Retrieves all the webhooks.

    Returns Promise<default<WebhookResponse>>

revokeRefreshToken

  • revokeRefreshToken(token: string, userId: string, applicationId: string): Promise<default<void>>
  • Revokes refresh tokens.

    Usage examples:

    • Delete a single refresh token, pass in only the token. revokeRefreshToken(token)

    • Delete all refresh tokens for a user, pass in only the userId. revokeRefreshToken(null, userId)

    • Delete all refresh tokens for a user for a specific application, pass in both the userId and the applicationId. revokeRefreshToken(null, userId, applicationId)

    • Delete all refresh tokens for an application revokeRefreshToken(null, null, applicationId)

    Note: null may be handled differently depending upon the programming language.

    See also: (method names may vary by language... but you'll figure it out)

    • revokeRefreshTokenById
    • revokeRefreshTokenByToken
    • revokeRefreshTokensByUserId
    • revokeRefreshTokensByApplicationId
    • revokeRefreshTokensByUserIdForApplication

    Parameters

    • token: string

      (Optional) The refresh token to delete.

    • userId: string

      (Optional) The user id whose tokens to delete.

    • applicationId: string

      (Optional) The application id of the tokens to delete.

    Returns Promise<default<void>>

revokeRefreshTokenById

  • revokeRefreshTokenById(tokenId: string): Promise<default<void>>
  • Revokes a single refresh token by the unique Id. The unique Id is not sensitive as it cannot be used to obtain another JWT.

    Parameters

    • tokenId: string

      The unique Id of the token to delete.

    Returns Promise<default<void>>

revokeRefreshTokenByToken

  • revokeRefreshTokenByToken(token: string): Promise<default<void>>
  • Revokes a single refresh token by using the actual refresh token value. This refresh token value is sensitive, so be careful with this API request.

    Parameters

    • token: string

      The refresh token to delete.

    Returns Promise<default<void>>

revokeRefreshTokensByApplicationId

  • revokeRefreshTokensByApplicationId(applicationId: string): Promise<default<void>>
  • Revoke all refresh tokens that belong to an application by applicationId.

    Parameters

    • applicationId: string

      The unique Id of the application that you want to delete all refresh tokens for.

    Returns Promise<default<void>>

revokeRefreshTokensByUserId

  • revokeRefreshTokensByUserId(userId: string): Promise<default<void>>
  • Revoke all refresh tokens that belong to a user by user Id.

    Parameters

    • userId: string

      The unique Id of the user that you want to delete all refresh tokens for.

    Returns Promise<default<void>>

revokeRefreshTokensByUserIdForApplication

  • revokeRefreshTokensByUserIdForApplication(userId: string, applicationId: string): Promise<default<void>>
  • Revoke all refresh tokens that belong to a user by user Id for a specific application by applicationId.

    Parameters

    • userId: string

      The unique Id of the user that you want to delete all refresh tokens for.

    • applicationId: string

      The unique Id of the application that you want to delete refresh tokens for.

    Returns Promise<default<void>>

revokeUserConsent

  • revokeUserConsent(userConsentId: string): Promise<default<void>>
  • Revokes a single User consent by Id.

    Parameters

    • userConsentId: string

      The User Consent Id

    Returns Promise<default<void>>

searchAuditLogs

  • Searches the audit logs with the specified criteria and pagination.

    Parameters

    Returns Promise<default<AuditLogSearchResponse>>

searchEntities

  • Searches entities with the specified criteria and pagination.

    Parameters

    Returns Promise<default<EntitySearchResponse>>

searchEntitiesByIds

  • Retrieves the entities for the given ids. If any id is invalid, it is ignored.

    Parameters

    • ids: string[]

      The entity ids to search for.

    Returns Promise<default<EntitySearchResponse>>

searchEntityGrants

  • Searches Entity Grants with the specified criteria and pagination.

    Parameters

    Returns Promise<default<EntityGrantSearchResponse>>

searchEntityTypes

  • Searches the entity types with the specified criteria and pagination.

    Parameters

    Returns Promise<default<EntityTypeSearchResponse>>

searchEventLogs

  • Searches the event logs with the specified criteria and pagination.

    Parameters

    Returns Promise<default<EventLogSearchResponse>>

searchLoginRecords

  • Searches the login records with the specified criteria and pagination.

    Parameters

    Returns Promise<default<LoginRecordSearchResponse>>

searchUsers

  • Retrieves the users for the given ids. If any id is invalid, it is ignored.

    deprecated

    This method has been renamed to searchUsersByIds, use that method instead.

    Parameters

    • ids: string[]

      The user ids to search for.

    Returns Promise<default<SearchResponse>>

searchUsersByIds

  • Retrieves the users for the given ids. If any id is invalid, it is ignored.

    Parameters

    • ids: string[]

      The user ids to search for.

    Returns Promise<default<SearchResponse>>

searchUsersByQuery

  • Retrieves the users for the given search criteria and pagination.

    Parameters

    • request: SearchRequest

      The search criteria and pagination constraints. Fields used: ids, query, queryString, numberOfResults, orderBy, startRow, and sortFields.

    Returns Promise<default<SearchResponse>>

searchUsersByQueryString

  • Retrieves the users for the given search criteria and pagination.

    deprecated

    This method has been renamed to searchUsersByQuery, use that method instead.

    Parameters

    • request: SearchRequest

      The search criteria and pagination constraints. Fields used: ids, query, queryString, numberOfResults, orderBy, startRow, and sortFields.

    Returns Promise<default<SearchResponse>>

sendEmail

  • Send an email using an email template id. You can optionally provide requestData to access key value pairs in the email template.

    Parameters

    • emailTemplateId: string

      The id for the template.

    • request: SendRequest

      The send email request that contains all of the information used to send the email.

    Returns Promise<default<SendResponse>>

sendFamilyRequestEmail

  • Sends out an email to a parent that they need to register and create a family or need to log in and add a child to their existing family.

    Parameters

    Returns Promise<default<void>>

sendPasswordlessCode

  • Send a passwordless authentication code in an email to complete login.

    Parameters

    • request: PasswordlessSendRequest

      The passwordless send request that contains all of the information used to send an email containing a code.

    Returns Promise<default<void>>

sendTwoFactorCode

  • Send a Two Factor authentication code to assist in setting up Two Factor authentication or disabling.

    deprecated

    This method has been renamed to sendTwoFactorCodeForEnableDisable, use that method instead.

    Parameters

    • request: TwoFactorSendRequest

      The request object that contains all of the information used to send the code.

    Returns Promise<default<void>>

sendTwoFactorCodeForEnableDisable

  • Send a Two Factor authentication code to assist in setting up Two Factor authentication or disabling.

    Parameters

    • request: TwoFactorSendRequest

      The request object that contains all of the information used to send the code.

    Returns Promise<default<void>>

sendTwoFactorCodeForLogin

  • sendTwoFactorCodeForLogin(twoFactorId: string): Promise<default<void>>
  • Send a Two Factor authentication code to allow the completion of Two Factor authentication.

    deprecated

    This method has been renamed to sendTwoFactorCodeForLoginUsingMethod, use that method instead.

    Parameters

    • twoFactorId: string

      The Id returned by the Login API necessary to complete Two Factor authentication.

    Returns Promise<default<void>>

sendTwoFactorCodeForLoginUsingMethod

  • sendTwoFactorCodeForLoginUsingMethod(twoFactorId: string, request: TwoFactorSendRequest): Promise<default<void>>
  • Send a Two Factor authentication code to allow the completion of Two Factor authentication.

    Parameters

    • twoFactorId: string

      The Id returned by the Login API necessary to complete Two Factor authentication.

    • request: TwoFactorSendRequest

      The Two Factor send request that contains all of the information used to send the Two Factor code to the user.

    Returns Promise<default<void>>

setRequestCredentials

  • setRequestCredentials(value: RequestCredentials): default
  • Sets whether and how cookies will be sent with each request.

    Parameters

    • value: RequestCredentials

      The value that indicates whether and how cookies will be sent.

    Returns default

setTenantId

  • setTenantId(tenantId: string): default
  • Sets the tenant id, that will be included in the X-FusionAuth-TenantId header.

    Parameters

    • tenantId: string

      The value of the X-FusionAuth-TenantId header.

    Returns default

Private start

  • creates a rest client

    Type parameters

    • RT

    • ERT

    Returns IRESTClient<RT, ERT>

    The RESTClient that will be used to call.

Private startAnonymous

  • Type parameters

    • RT

    • ERT

    Returns IRESTClient<RT, ERT>

startIdentityProviderLogin

  • Begins a login request for a 3rd party login that requires user interaction such as HYPR.

    Parameters

    • request: IdentityProviderStartLoginRequest

      The third-party login request that contains information from the third-party login providers that FusionAuth uses to reconcile the user's account.

    Returns Promise<default<IdentityProviderStartLoginResponse>>

startPasswordlessLogin

  • Start a passwordless login request by generating a passwordless code. This code can be sent to the User using the Send Passwordless Code API or using a mechanism outside of FusionAuth. The passwordless login is completed by using the Passwordless Login API with this code.

    Parameters

    • request: PasswordlessStartRequest

      The passwordless start request that contains all of the information used to begin the passwordless login request.

    Returns Promise<default<PasswordlessStartResponse>>

startTwoFactorLogin

  • Start a Two-Factor login request by generating a two-factor identifier. This code can then be sent to the Two Factor Send API (/api/two-factor/send)in order to send a one-time use code to a user. You can also use one-time use code returned to send the code out-of-band. The Two-Factor login is completed by making a request to the Two-Factor Login API (/api/two-factor/login). with the two-factor identifier and the one-time use code.

    This API is intended to allow you to begin a Two-Factor login outside of a normal login that originated from the Login API (/api/login).

    Parameters

    • request: TwoFactorStartRequest

      The Two-Factor start request that contains all of the information used to begin the Two-Factor login request.

    Returns Promise<default<TwoFactorStartResponse>>

twoFactorLogin

  • Complete login using a 2FA challenge

    Parameters

    • request: TwoFactorLoginRequest

      The login request that contains the user credentials used to log them in.

    Returns Promise<default<LoginResponse>>

updateAPIKey

  • Updates an API key by given id

    Parameters

    • apiKeyId: string

      The Id of the API key to update.

    • request: APIKeyRequest

      The request object that contains all of the information used to create the API Key.

    Returns Promise<default<APIKeyResponse>>

updateApplication

  • Updates the application with the given Id.

    Parameters

    • applicationId: string

      The Id of the application to update.

    • request: ApplicationRequest

      The request that contains all of the new application information.

    Returns Promise<default<ApplicationResponse>>

updateApplicationRole

  • Updates the application role with the given id for the application.

    Parameters

    • applicationId: string

      The Id of the application that the role belongs to.

    • roleId: string

      The Id of the role to update.

    • request: ApplicationRequest

      The request that contains all of the new role information.

    Returns Promise<default<ApplicationResponse>>

updateConnector

  • Updates the connector with the given Id.

    Parameters

    • connectorId: string

      The Id of the connector to update.

    • request: ConnectorRequest

      The request object that contains all of the new connector information.

    Returns Promise<default<ConnectorResponse>>

updateConsent

  • Updates the consent with the given Id.

    Parameters

    • consentId: string

      The Id of the consent to update.

    • request: ConsentRequest

      The request that contains all of the new consent information.

    Returns Promise<default<ConsentResponse>>

updateEmailTemplate

  • Updates the email template with the given Id.

    Parameters

    • emailTemplateId: string

      The Id of the email template to update.

    • request: EmailTemplateRequest

      The request that contains all of the new email template information.

    Returns Promise<default<EmailTemplateResponse>>

updateEntity

  • Updates the Entity with the given Id.

    Parameters

    • entityId: string

      The Id of the Entity to update.

    • request: EntityRequest

      The request that contains all of the new Entity information.

    Returns Promise<default<EntityResponse>>

updateEntityType

  • Updates the Entity Type with the given Id.

    Parameters

    • entityTypeId: string

      The Id of the Entity Type to update.

    • request: EntityTypeRequest

      The request that contains all of the new Entity Type information.

    Returns Promise<default<EntityTypeResponse>>

updateEntityTypePermission

  • Updates the permission with the given id for the entity type.

    Parameters

    • entityTypeId: string

      The Id of the entityType that the permission belongs to.

    • permissionId: string

      The Id of the permission to update.

    • request: EntityTypeRequest

      The request that contains all of the new permission information.

    Returns Promise<default<EntityTypeResponse>>

updateForm

  • Updates the form with the given Id.

    Parameters

    • formId: string

      The Id of the form to update.

    • request: FormRequest

      The request object that contains all of the new form information.

    Returns Promise<default<FormResponse>>

updateFormField

  • Updates the form field with the given Id.

    Parameters

    • fieldId: string

      The Id of the form field to update.

    • request: FormFieldRequest

      The request object that contains all of the new form field information.

    Returns Promise<default<FormFieldResponse>>

updateGroup

  • Updates the group with the given Id.

    Parameters

    • groupId: string

      The Id of the group to update.

    • request: GroupRequest

      The request that contains all of the new group information.

    Returns Promise<default<GroupResponse>>

updateIdentityProvider

  • Updates the identity provider with the given Id.

    Parameters

    • identityProviderId: string

      The Id of the identity provider to update.

    • request: IdentityProviderRequest

      The request object that contains the updated identity provider.

    Returns Promise<default<IdentityProviderResponse>>

updateIntegrations

  • Updates the available integrations.

    Parameters

    • request: IntegrationRequest

      The request that contains all of the new integration information.

    Returns Promise<default<IntegrationResponse>>

updateKey

  • Updates the key with the given Id.

    Parameters

    • keyId: string

      The Id of the key to update.

    • request: KeyRequest

      The request that contains all of the new key information.

    Returns Promise<default<KeyResponse>>

updateLambda

  • Updates the lambda with the given Id.

    Parameters

    • lambdaId: string

      The Id of the lambda to update.

    • request: LambdaRequest

      The request that contains all of the new lambda information.

    Returns Promise<default<LambdaResponse>>

updateMessageTemplate

  • Updates the message template with the given Id.

    Parameters

    • messageTemplateId: string

      The Id of the message template to update.

    • request: MessageTemplateRequest

      The request that contains all of the new message template information.

    Returns Promise<default<MessageTemplateResponse>>

updateMessenger

  • Updates the messenger with the given Id.

    Parameters

    • messengerId: string

      The Id of the messenger to update.

    • request: MessengerRequest

      The request object that contains all of the new messenger information.

    Returns Promise<default<MessengerResponse>>

updateRegistration

  • Updates the registration for the user with the given id and the application defined in the request.

    Parameters

    • userId: string

      The Id of the user whose registration is going to be updated.

    • request: RegistrationRequest

      The request that contains all of the new registration information.

    Returns Promise<default<RegistrationResponse>>

updateSystemConfiguration

updateTenant

  • Updates the tenant with the given Id.

    Parameters

    • tenantId: string

      The Id of the tenant to update.

    • request: TenantRequest

      The request that contains all of the new tenant information.

    Returns Promise<default<TenantResponse>>

updateTheme

  • Updates the theme with the given Id.

    Parameters

    • themeId: string

      The Id of the theme to update.

    • request: ThemeRequest

      The request that contains all of the new theme information.

    Returns Promise<default<ThemeResponse>>

updateUser

  • Updates the user with the given Id.

    Parameters

    • userId: string

      The Id of the user to update.

    • request: UserRequest

      The request that contains all of the new user information.

    Returns Promise<default<UserResponse>>

updateUserAction

  • Updates the user action with the given Id.

    Parameters

    • userActionId: string

      The Id of the user action to update.

    • request: UserActionRequest

      The request that contains all of the new user action information.

    Returns Promise<default<UserActionResponse>>

updateUserActionReason

  • Updates the user action reason with the given Id.

    Parameters

    • userActionReasonId: string

      The Id of the user action reason to update.

    • request: UserActionReasonRequest

      The request that contains all of the new user action reason information.

    Returns Promise<default<UserActionReasonResponse>>

updateUserConsent

  • Updates a single User consent by Id.

    Parameters

    • userConsentId: string

      The User Consent Id

    • request: UserConsentRequest

      The request that contains the user consent information.

    Returns Promise<default<UserConsentResponse>>

updateWebhook

  • Updates the webhook with the given Id.

    Parameters

    • webhookId: string

      The Id of the webhook to update.

    • request: WebhookRequest

      The request that contains all of the new webhook information.

    Returns Promise<default<WebhookResponse>>

upsertEntityGrant

  • upsertEntityGrant(entityId: string, request: EntityGrantRequest): Promise<default<void>>
  • Creates or updates an Entity Grant. This is when a User/Entity is granted permissions to an Entity.

    Parameters

    • entityId: string

      The Id of the Entity that the User/Entity is being granted access to.

    • request: EntityGrantRequest

      The request object that contains all of the information used to create the Entity Grant.

    Returns Promise<default<void>>

validateDevice

  • validateDevice(user_code: string, client_id: string): Promise<default<void>>
  • Validates the end-user provided user_code from the user-interaction of the Device Authorization Grant. If you build your own activation form you should validate the user provided code prior to beginning the Authorization grant.

    Parameters

    • user_code: string

      The end-user verification code.

    • client_id: string

      The client id.

    Returns Promise<default<void>>

validateJWT

  • Validates the provided JWT (encoded JWT string) to ensure the token is valid. A valid access token is properly signed and not expired.

    This API may be used to verify the JWT as well as decode the encoded JWT into human readable identity claims.

    Parameters

    • encodedJWT: string

      The encoded JWT (access token).

    Returns Promise<default<ValidateResponse>>

verifyEmail

  • verifyEmail(verificationId: string): Promise<default<void>>
  • Confirms a email verification. The Id given is usually from an email sent to the user.

    deprecated

    This method has been renamed to verifyEmailAddress and changed to take a JSON request body, use that method instead.

    Parameters

    • verificationId: string

      The email verification id sent to the user.

    Returns Promise<default<void>>

verifyEmailAddress

  • Confirms a user's email address.

    The request body will contain the verificationId. You may also be required to send a one-time use code based upon your configuration. When the tenant is configured to gate a user until their email address is verified, this procedures requires two values instead of one. The verificationId is a high entropy value and the one-time use code is a low entropy value that is easily entered in a user interactive form. The two values together are able to confirm a user's email address and mark the user's email address as verified.

    Parameters

    • request: VerifyEmailRequest

      The request that contains the verificationId and optional one-time use code paired with the verificationId.

    Returns Promise<default<void>>

verifyRegistration

  • verifyRegistration(verificationId: string): Promise<default<void>>
  • Confirms an application registration. The Id given is usually from an email sent to the user.

    deprecated

    This method has been renamed to verifyUserRegistration and changed to take a JSON request body, use that method instead.

    Parameters

    • verificationId: string

      The registration verification Id sent to the user.

    Returns Promise<default<void>>

verifyUserRegistration

  • Confirms a user's registration.

    The request body will contain the verificationId. You may also be required to send a one-time use code based upon your configuration. When the application is configured to gate a user until their registration is verified, this procedures requires two values instead of one. The verificationId is a high entropy value and the one-time use code is a low entropy value that is easily entered in a user interactive form. The two values together are able to confirm a user's registration and mark the user's registration as verified.

    Parameters

    • request: VerifyRegistrationRequest

      The request that contains the verificationId and optional one-time use code paired with the verificationId.

    Returns Promise<default<void>>

Generated using TypeDoc