FusionAuth PHP Client

FusionAuthClient
in package

Client that connects to a FusionAuth server and provides access to the full set of FusionAuth APIs.

When any method is called the return value is always a ClientResponse object. When an API call was successful, the response will contain the response from the server. This might be empty or contain an success object or an error object. If there was a validation error or any other type of error, this will return the Errors object in the response. Additionally, if FusionAuth could not be contacted because it is down or experiencing a failure, the response will contain an Exception, which could be an IOException.

Tags
author

Brian Pontarelli

Table of Contents

Properties

$connectTimeout  : int
$readTimeout  : int
$apiKey  : string
$baseURL  : string
$tenantId  : string

Methods

__construct()  : mixed
actionUser()  : ClientResponse
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.
activateReactor()  : ClientResponse
Activates the FusionAuth Reactor using a license Id and optionally a license text (for air-gapped deployments)
addUserToFamily()  : ClientResponse
Adds a user to an existing family. The family Id must be specified.
approveDevice()  : ClientResponse
Approve a device grant.
cancelAction()  : ClientResponse
Cancels the user action.
changePassword()  : ClientResponse
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.
changePasswordByIdentity()  : ClientResponse
Changes a user's password using their identity (loginId 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.
checkChangePasswordUsingId()  : ClientResponse
Check to see if the user must obtain a Trust Token Id in order to complete a change password request.
checkChangePasswordUsingJWT()  : ClientResponse
Check to see if the user must obtain a Trust Token Id in order to complete a change password request.
checkChangePasswordUsingLoginId()  : ClientResponse
Check to see if the user must obtain a Trust Request Id in order to complete a change password request.
clientCredentialsGrant()  : ClientResponse
Make a Client Credentials grant request to obtain an access token.
commentOnUser()  : ClientResponse
Adds a comment to the user's account.
completeWebAuthnAssertion()  : ClientResponse
Complete a WebAuthn authentication ceremony by validating the signature against the previously generated challenge without logging the user in
completeWebAuthnLogin()  : ClientResponse
Complete a WebAuthn authentication ceremony by validating the signature against the previously generated challenge and then login the user in
completeWebAuthnRegistration()  : ClientResponse
Complete a WebAuthn registration ceremony by validating the client request and saving the new credential
createAPIKey()  : ClientResponse
Creates an API key. You can optionally specify a unique Id for the key, if not provided one will be generated.
createApplication()  : ClientResponse
Creates an application. You can optionally specify an Id for the application, if not provided one will be generated.
createApplicationRole()  : ClientResponse
Creates a new role for an application. You must specify the Id of the application you are creating the role for.
createAuditLog()  : ClientResponse
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.
createConnector()  : ClientResponse
Creates a connector. You can optionally specify an Id for the connector, if not provided one will be generated.
createConsent()  : ClientResponse
Creates a user consent type. You can optionally specify an Id for the consent type, if not provided one will be generated.
createEmailTemplate()  : ClientResponse
Creates an email template. You can optionally specify an Id for the template, if not provided one will be generated.
createEntity()  : ClientResponse
Creates an Entity. You can optionally specify an Id for the Entity. If not provided one will be generated.
createEntityType()  : ClientResponse
Creates a Entity Type. You can optionally specify an Id for the Entity Type, if not provided one will be generated.
createEntityTypePermission()  : ClientResponse
Creates a new permission for an entity type. You must specify the Id of the entity type you are creating the permission for.
createFamily()  : ClientResponse
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.
createForm()  : ClientResponse
Creates a form. You can optionally specify an Id for the form, if not provided one will be generated.
createFormField()  : ClientResponse
Creates a form field. You can optionally specify an Id for the form, if not provided one will be generated.
createGroup()  : ClientResponse
Creates a group. You can optionally specify an Id for the group, if not provided one will be generated.
createGroupMembers()  : ClientResponse
Creates a member in a group.
createIdentityProvider()  : ClientResponse
Creates an identity provider. You can optionally specify an Id for the identity provider, if not provided one will be generated.
createIPAccessControlList()  : ClientResponse
Creates an IP Access Control List. You can optionally specify an Id on this create request, if one is not provided one will be generated.
createLambda()  : ClientResponse
Creates a Lambda. You can optionally specify an Id for the lambda, if not provided one will be generated.
createMessageTemplate()  : ClientResponse
Creates an message template. You can optionally specify an Id for the template, if not provided one will be generated.
createMessenger()  : ClientResponse
Creates a messenger. You can optionally specify an Id for the messenger, if not provided one will be generated.
createOAuthScope()  : ClientResponse
Creates a new custom OAuth scope for an application. You must specify the Id of the application you are creating the scope for.
createTenant()  : ClientResponse
Creates a tenant. You can optionally specify an Id for the tenant, if not provided one will be generated.
createTheme()  : ClientResponse
Creates a Theme. You can optionally specify an Id for the theme, if not provided one will be generated.
createUser()  : ClientResponse
Creates a user. You can optionally specify an Id for the user, if not provided one will be generated.
createUserAction()  : ClientResponse
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.
createUserActionReason()  : ClientResponse
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.
createUserConsent()  : ClientResponse
Creates a single User consent.
createUserLink()  : ClientResponse
Link an external user from a 3rd party identity provider to a FusionAuth user.
createWebhook()  : ClientResponse
Creates a webhook. You can optionally specify an Id for the webhook, if not provided one will be generated.
deactivateApplication()  : ClientResponse
Deactivates the application with the given Id.
deactivateReactor()  : ClientResponse
Deactivates the FusionAuth Reactor.
deactivateUser()  : ClientResponse
Deactivates the user with the given Id.
deactivateUserAction()  : ClientResponse
Deactivates the user action with the given Id.
deactivateUsers()  : ClientResponse
Deactivates the users with the given ids.
deactivateUsersByIds()  : ClientResponse
Deactivates the users with the given ids.
deleteAPIKey()  : ClientResponse
Deletes the API key for the given Id.
deleteApplication()  : ClientResponse
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.
deleteApplicationRole()  : ClientResponse
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.
deleteConnector()  : ClientResponse
Deletes the connector for the given Id.
deleteConsent()  : ClientResponse
Deletes the consent for the given Id.
deleteEmailTemplate()  : ClientResponse
Deletes the email template for the given Id.
deleteEntity()  : ClientResponse
Deletes the Entity for the given Id.
deleteEntityGrant()  : ClientResponse
Deletes an Entity Grant for the given User or Entity.
deleteEntityType()  : ClientResponse
Deletes the Entity Type for the given Id.
deleteEntityTypePermission()  : ClientResponse
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.
deleteForm()  : ClientResponse
Deletes the form for the given Id.
deleteFormField()  : ClientResponse
Deletes the form field for the given Id.
deleteGroup()  : ClientResponse
Deletes the group for the given Id.
deleteGroupMembers()  : ClientResponse
Removes users as members of a group.
deleteIdentityProvider()  : ClientResponse
Deletes the identity provider for the given Id.
deleteIPAccessControlList()  : ClientResponse
Deletes the IP Access Control List for the given Id.
deleteKey()  : ClientResponse
Deletes the key for the given Id.
deleteLambda()  : ClientResponse
Deletes the lambda for the given Id.
deleteMessageTemplate()  : ClientResponse
Deletes the message template for the given Id.
deleteMessenger()  : ClientResponse
Deletes the messenger for the given Id.
deleteOAuthScope()  : ClientResponse
Hard deletes a custom OAuth scope.
deleteRegistration()  : ClientResponse
Deletes the user registration for the given user and application.
deleteRegistrationWithRequest()  : ClientResponse
Deletes the user registration for the given user and application along with the given JSON body that contains the event information.
deleteTenant()  : ClientResponse
Deletes the tenant based on the given Id on the URL. This permanently deletes all information, metrics, reports and data associated with the tenant and everything under the tenant (applications, users, etc).
deleteTenantAsync()  : ClientResponse
Deletes the tenant for the given Id asynchronously.
deleteTenantWithRequest()  : ClientResponse
Deletes the tenant based on the given request (sent to the API as JSON). This permanently deletes all information, metrics, reports and data associated with the tenant and everything under the tenant (applications, users, etc).
deleteTheme()  : ClientResponse
Deletes the theme for the given Id.
deleteUser()  : ClientResponse
Deletes the user for the given Id. This permanently deletes all information, metrics, reports and data associated with the user.
deleteUserAction()  : ClientResponse
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.
deleteUserActionReason()  : ClientResponse
Deletes the user action reason for the given Id.
deleteUserLink()  : ClientResponse
Remove an existing link that has been made from a 3rd party identity provider to a FusionAuth user.
deleteUsers()  : ClientResponse
Deletes the users with the given ids, or users matching the provided JSON query or queryString.
deleteUsersByQuery()  : ClientResponse
Deletes the users with the given ids, or users matching the provided JSON query or queryString.
deleteUserWithRequest()  : ClientResponse
Deletes the user based on the given request (sent to the API as JSON). This permanently deletes all information, metrics, reports and data associated with the user.
deleteWebAuthnCredential()  : ClientResponse
Deletes the WebAuthn credential for the given Id.
deleteWebhook()  : ClientResponse
Deletes the webhook for the given Id.
disableTwoFactor()  : ClientResponse
Disable two-factor authentication for a user.
disableTwoFactorWithRequest()  : ClientResponse
Disable two-factor authentication for a user using a JSON body rather than URL parameters.
enableTwoFactor()  : ClientResponse
Enable two-factor authentication for a user.
exchangeOAuthCodeForAccessToken()  : ClientResponse
Exchanges an OAuth authorization code for an access token.
exchangeOAuthCodeForAccessTokenUsingPKCE()  : ClientResponse
Exchanges an OAuth authorization code and code_verifier for an access token.
exchangeRefreshTokenForAccessToken()  : ClientResponse
Exchange a Refresh Token for an Access Token.
exchangeRefreshTokenForJWT()  : ClientResponse
Exchange a refresh token for a new JWT.
exchangeUserCredentialsForAccessToken()  : ClientResponse
Exchange User Credentials for a Token.
forgotPassword()  : ClientResponse
Begins the forgot password sequence, which kicks off an email to the user so that they can reset their password.
generateEmailVerificationId()  : ClientResponse
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.
generateKey()  : ClientResponse
Generate a new RSA or EC key pair or an HMAC secret.
generateRegistrationVerificationId()  : ClientResponse
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.
generateTwoFactorRecoveryCodes()  : ClientResponse
Generate two-factor recovery codes for a user. Generating two-factor recovery codes will invalidate any existing recovery codes.
generateTwoFactorSecret()  : ClientResponse
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.
generateTwoFactorSecretUsingJWT()  : ClientResponse
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.
identityProviderLogin()  : ClientResponse
Handles login via third-parties including Social login, external OAuth and OpenID Connect, and other login systems.
importKey()  : ClientResponse
Import an existing RSA or EC key pair or an HMAC secret.
importRefreshTokens()  : ClientResponse
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.
importUsers()  : ClientResponse
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.
importWebAuthnCredential()  : ClientResponse
Import a WebAuthn credential
introspectAccessToken()  : ClientResponse
Inspect an access token issued as the result of the User based grant such as the Authorization Code Grant, Implicit Grant, the User Credentials Grant or the Refresh Grant.
introspectClientCredentialsAccessToken()  : ClientResponse
Inspect an access token issued as the result of the Client Credentials Grant.
issueJWT()  : ClientResponse
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.
login()  : ClientResponse
Authenticates a user to FusionAuth.
loginPing()  : ClientResponse
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.
loginPingWithRequest()  : ClientResponse
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.
logout()  : ClientResponse
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.
logoutWithRequest()  : ClientResponse
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 takes the refresh token in the JSON body.
lookupIdentityProvider()  : ClientResponse
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.
modifyAction()  : ClientResponse
Modifies a temporal user action by changing the expiration of the action and optionally adding a comment to the action.
passwordlessLogin()  : ClientResponse
Complete a login request using a passwordless code
patchAPIKey()  : ClientResponse
Updates an authentication API key by given id
patchApplication()  : ClientResponse
Updates, via PATCH, the application with the given Id.
patchApplicationRole()  : ClientResponse
Updates, via PATCH, the application role with the given Id for the application.
patchConnector()  : ClientResponse
Updates, via PATCH, the connector with the given Id.
patchConsent()  : ClientResponse
Updates, via PATCH, the consent with the given Id.
patchEmailTemplate()  : ClientResponse
Updates, via PATCH, the email template with the given Id.
patchEntityType()  : ClientResponse
Updates, via PATCH, the Entity Type with the given Id.
patchGroup()  : ClientResponse
Updates, via PATCH, the group with the given Id.
patchIdentityProvider()  : ClientResponse
Updates, via PATCH, the identity provider with the given Id.
patchIntegrations()  : ClientResponse
Updates, via PATCH, the available integrations.
patchLambda()  : ClientResponse
Updates, via PATCH, the lambda with the given Id.
patchMessageTemplate()  : ClientResponse
Updates, via PATCH, the message template with the given Id.
patchMessenger()  : ClientResponse
Updates, via PATCH, the messenger with the given Id.
patchOAuthScope()  : ClientResponse
Updates, via PATCH, the custom OAuth scope with the given Id for the application.
patchRegistration()  : ClientResponse
Updates, via PATCH, the registration for the user with the given Id and the application defined in the request.
patchSystemConfiguration()  : ClientResponse
Updates, via PATCH, the system configuration.
patchTenant()  : ClientResponse
Updates, via PATCH, the tenant with the given Id.
patchTheme()  : ClientResponse
Updates, via PATCH, the theme with the given Id.
patchUser()  : ClientResponse
Updates, via PATCH, the user with the given Id.
patchUserAction()  : ClientResponse
Updates, via PATCH, the user action with the given Id.
patchUserActionReason()  : ClientResponse
Updates, via PATCH, the user action reason with the given Id.
patchUserConsent()  : ClientResponse
Updates, via PATCH, a single User consent by Id.
reactivateApplication()  : ClientResponse
Reactivates the application with the given Id.
reactivateUser()  : ClientResponse
Reactivates the user with the given Id.
reactivateUserAction()  : ClientResponse
Reactivates the user action with the given Id.
reconcileJWT()  : ClientResponse
Reconcile a User to FusionAuth using JWT issued from another Identity Provider.
refreshEntitySearchIndex()  : ClientResponse
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.
refreshUserSearchIndex()  : ClientResponse
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.
regenerateReactorKeys()  : ClientResponse
Regenerates any keys that are used by the FusionAuth Reactor.
register()  : ClientResponse
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.
reindex()  : ClientResponse
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.
removeUserFromFamily()  : ClientResponse
Removes a user from the family with the given id.
resendEmailVerification()  : ClientResponse
Re-sends the verification email to the user.
resendEmailVerificationWithApplicationTemplate()  : ClientResponse
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.
resendRegistrationVerification()  : ClientResponse
Re-sends the application registration verification email to the user.
retrieveAction()  : ClientResponse
Retrieves a single action log (the log of a user action that was taken on a user previously) for the given Id.
retrieveActions()  : ClientResponse
Retrieves all 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.
retrieveActionsPreventingLogin()  : ClientResponse
Retrieves all the actions for the user with the given Id that are currently preventing the User from logging in.
retrieveActiveActions()  : ClientResponse
Retrieves all the actions for the user with the given Id that are currently active.
retrieveAPIKey()  : ClientResponse
Retrieves an authentication API key for the given id
retrieveApplication()  : ClientResponse
Retrieves the application for the given Id or all the applications if the Id is null.
retrieveApplications()  : ClientResponse
Retrieves all the applications.
retrieveAuditLog()  : ClientResponse
Retrieves a single audit log for the given Id.
retrieveConnector()  : ClientResponse
Retrieves the connector with the given Id.
retrieveConnectors()  : ClientResponse
Retrieves all the connectors.
retrieveConsent()  : ClientResponse
Retrieves the Consent for the given Id.
retrieveConsents()  : ClientResponse
Retrieves all the consent.
retrieveDailyActiveReport()  : ClientResponse
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.
retrieveEmailTemplate()  : ClientResponse
Retrieves the email template for the given Id. If you don't specify the id, this will return all the email templates.
retrieveEmailTemplatePreview()  : ClientResponse
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.
retrieveEmailTemplates()  : ClientResponse
Retrieves all the email templates.
retrieveEntity()  : ClientResponse
Retrieves the Entity for the given Id.
retrieveEntityGrant()  : ClientResponse
Retrieves an Entity Grant for the given Entity and User/Entity.
retrieveEntityType()  : ClientResponse
Retrieves the Entity Type for the given Id.
retrieveEntityTypes()  : ClientResponse
Retrieves all the Entity Types.
retrieveEventLog()  : ClientResponse
Retrieves a single event log for the given Id.
retrieveFamilies()  : ClientResponse
Retrieves all the families that a user belongs to.
retrieveFamilyMembersByFamilyId()  : ClientResponse
Retrieves all the members of a family by the unique Family Id.
retrieveForm()  : ClientResponse
Retrieves the form with the given Id.
retrieveFormField()  : ClientResponse
Retrieves the form field with the given Id.
retrieveFormFields()  : ClientResponse
Retrieves all the forms fields
retrieveForms()  : ClientResponse
Retrieves all the forms.
retrieveGroup()  : ClientResponse
Retrieves the group for the given Id.
retrieveGroups()  : ClientResponse
Retrieves all the groups.
retrieveIdentityProvider()  : ClientResponse
Retrieves the identity provider for the given Id or all the identity providers if the Id is null.
retrieveIdentityProviderByType()  : ClientResponse
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.
retrieveIdentityProviders()  : ClientResponse
Retrieves all the identity providers.
retrieveInactiveActions()  : ClientResponse
Retrieves all the actions for the user with the given Id that are currently inactive.
retrieveInactiveApplications()  : ClientResponse
Retrieves all the applications that are currently inactive.
retrieveInactiveUserActions()  : ClientResponse
Retrieves all the user actions that are currently inactive.
retrieveIntegration()  : ClientResponse
Retrieves the available integrations.
retrieveIPAccessControlList()  : ClientResponse
Retrieves the IP Access Control List with the given Id.
retrieveJsonWebKeySet()  : ClientResponse
Returns public keys used by FusionAuth to cryptographically verify JWTs using the JSON Web Key format.
retrieveJWTPublicKey()  : ClientResponse
Retrieves the Public Key configured for verifying JSON Web Tokens (JWT) by the key Id (kid).
retrieveJWTPublicKeyByApplicationId()  : ClientResponse
Retrieves the Public Key configured for verifying the JSON Web Tokens (JWT) issued by the Login API by the Application Id.
retrieveJWTPublicKeys()  : ClientResponse
Retrieves all Public Keys configured for verifying JSON Web Tokens (JWT).
retrieveKey()  : ClientResponse
Retrieves the key for the given Id.
retrieveKeys()  : ClientResponse
Retrieves all the keys.
retrieveLambda()  : ClientResponse
Retrieves the lambda for the given Id.
retrieveLambdas()  : ClientResponse
Retrieves all the lambdas.
retrieveLambdasByType()  : ClientResponse
Retrieves all the lambdas for the provided type.
retrieveLoginReport()  : ClientResponse
Retrieves the login report between the two instants. If you specify an application id, it will only return the login counts for that application.
retrieveMessageTemplate()  : ClientResponse
Retrieves the message template for the given Id. If you don't specify the id, this will return all the message templates.
retrieveMessageTemplatePreview()  : ClientResponse
Creates a preview of the message template provided in the request, normalized to a given locale.
retrieveMessageTemplates()  : ClientResponse
Retrieves all the message templates.
retrieveMessenger()  : ClientResponse
Retrieves the messenger with the given Id.
retrieveMessengers()  : ClientResponse
Retrieves all the messengers.
retrieveMonthlyActiveReport()  : ClientResponse
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.
retrieveOauthConfiguration()  : ClientResponse
Retrieves the Oauth2 configuration for the application for the given Application Id.
retrieveOAuthScope()  : ClientResponse
Retrieves a custom OAuth scope.
retrieveOpenIdConfiguration()  : ClientResponse
Returns the well known OpenID Configuration JSON document
retrievePasswordValidationRules()  : ClientResponse
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.
retrievePasswordValidationRulesWithTenantId()  : ClientResponse
Retrieves the password validation rules for a specific tenant.
retrievePendingChildren()  : ClientResponse
Retrieves all the children for the given parent email address.
retrievePendingLink()  : ClientResponse
Retrieve a pending identity provider link. This is useful to validate a pending link and retrieve meta-data about the identity provider link.
retrieveReactorMetrics()  : ClientResponse
Retrieves the FusionAuth Reactor metrics.
retrieveReactorStatus()  : ClientResponse
Retrieves the FusionAuth Reactor status.
retrieveRecentLogins()  : ClientResponse
Retrieves the last number of login records.
retrieveRefreshTokenById()  : ClientResponse
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.
retrieveRefreshTokens()  : ClientResponse
Retrieves the refresh tokens that belong to the user with the given Id.
retrieveRegistration()  : ClientResponse
Retrieves the user registration for the user with the given Id and the given application id.
retrieveRegistrationReport()  : ClientResponse
Retrieves the registration report between the two instants. If you specify an application id, it will only return the registration counts for that application.
retrieveReindexStatus()  : ClientResponse
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.
retrieveSystemConfiguration()  : ClientResponse
Retrieves the system configuration.
retrieveSystemHealth()  : ClientResponse
Retrieves the FusionAuth system health. This API will return 200 if the system is healthy, and 500 if the system is un-healthy.
retrieveSystemStatus()  : ClientResponse
Retrieves the FusionAuth system status. This request is anonymous and does not require an API key. When an API key is not provided the response will contain a single value in the JSON response indicating the current health check.
retrieveSystemStatusUsingAPIKey()  : ClientResponse
Retrieves the FusionAuth system status using an API key. Using an API key will cause the response to include the product version, health checks and various runtime metrics.
retrieveTenant()  : ClientResponse
Retrieves the tenant for the given Id.
retrieveTenants()  : ClientResponse
Retrieves all the tenants.
retrieveTheme()  : ClientResponse
Retrieves the theme for the given Id.
retrieveThemes()  : ClientResponse
Retrieves all the themes.
retrieveTotalReport()  : ClientResponse
Retrieves the totals report. This contains all the total counts for each application and the global registration count.
retrieveTwoFactorRecoveryCodes()  : ClientResponse
Retrieve two-factor recovery codes for a user.
retrieveTwoFactorStatus()  : ClientResponse
Retrieve a user's two-factor status.
retrieveUser()  : ClientResponse
Retrieves the user for the given Id.
retrieveUserAction()  : ClientResponse
Retrieves the user action for the given Id. If you pass in null for the id, this will return all the user actions.
retrieveUserActionReason()  : ClientResponse
Retrieves the user action reason for the given Id. If you pass in null for the id, this will return all the user action reasons.
retrieveUserActionReasons()  : ClientResponse
Retrieves all the user action reasons.
retrieveUserActions()  : ClientResponse
Retrieves all the user actions.
retrieveUserByChangePasswordId()  : ClientResponse
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.
retrieveUserByEmail()  : ClientResponse
Retrieves the user for the given email.
retrieveUserByLoginId()  : ClientResponse
Retrieves the user for the loginId. The loginId can be either the username or the email.
retrieveUserByUsername()  : ClientResponse
Retrieves the user for the given username.
retrieveUserByVerificationId()  : ClientResponse
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.
retrieveUserCode()  : ClientResponse
Retrieve a user_code that is part of an in-progress Device Authorization Grant.
retrieveUserCodeUsingAPIKey()  : ClientResponse
Retrieve a user_code that is part of an in-progress Device Authorization Grant.
retrieveUserComments()  : ClientResponse
Retrieves all the comments for the user with the given Id.
retrieveUserConsent()  : ClientResponse
Retrieve a single User consent by Id.
retrieveUserConsents()  : ClientResponse
Retrieves all the consents for a User.
retrieveUserInfoFromAccessToken()  : ClientResponse
Call the UserInfo endpoint to retrieve User Claims from the access token issued by FusionAuth.
retrieveUserLink()  : ClientResponse
Retrieve a single Identity Provider user (link).
retrieveUserLinksByUserId()  : ClientResponse
Retrieve all Identity Provider users (links) for the user. Specify the optional identityProviderId to retrieve links for a particular IdP.
retrieveUserLoginReport()  : ClientResponse
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.
retrieveUserLoginReportByLoginId()  : ClientResponse
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.
retrieveUserRecentLogins()  : ClientResponse
Retrieves the last number of login records for a user.
retrieveUserUsingJWT()  : ClientResponse
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.
retrieveVersion()  : ClientResponse
Retrieves the FusionAuth version string.
retrieveWebAuthnCredential()  : ClientResponse
Retrieves the WebAuthn credential for the given Id.
retrieveWebAuthnCredentialsForUser()  : ClientResponse
Retrieves all WebAuthn credentials for the given user.
retrieveWebhook()  : ClientResponse
Retrieves the webhook for the given Id. If you pass in null for the id, this will return all the webhooks.
retrieveWebhooks()  : ClientResponse
Retrieves all the webhooks.
revokeRefreshToken()  : ClientResponse
Revokes refresh tokens.
revokeRefreshTokenById()  : ClientResponse
Revokes a single refresh token by the unique Id. The unique Id is not sensitive as it cannot be used to obtain another JWT.
revokeRefreshTokenByToken()  : ClientResponse
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.
revokeRefreshTokensByApplicationId()  : ClientResponse
Revoke all refresh tokens that belong to an application by applicationId.
revokeRefreshTokensByUserId()  : ClientResponse
Revoke all refresh tokens that belong to a user by user Id.
revokeRefreshTokensByUserIdForApplication()  : ClientResponse
Revoke all refresh tokens that belong to a user by user Id for a specific application by applicationId.
revokeRefreshTokensWithRequest()  : ClientResponse
Revokes refresh tokens using the information in the JSON body. The handling for this method is the same as the revokeRefreshToken method and is based on the information you provide in the RefreshDeleteRequest object. See that method for additional information.
revokeUserConsent()  : ClientResponse
Revokes a single User consent by Id.
searchApplications()  : ClientResponse
Searches applications with the specified criteria and pagination.
searchAuditLogs()  : ClientResponse
Searches the audit logs with the specified criteria and pagination.
searchConsents()  : ClientResponse
Searches consents with the specified criteria and pagination.
searchEmailTemplates()  : ClientResponse
Searches email templates with the specified criteria and pagination.
searchEntities()  : ClientResponse
Searches entities with the specified criteria and pagination.
searchEntitiesByIds()  : ClientResponse
Retrieves the entities for the given ids. If any Id is invalid, it is ignored.
searchEntityGrants()  : ClientResponse
Searches Entity Grants with the specified criteria and pagination.
searchEntityTypes()  : ClientResponse
Searches the entity types with the specified criteria and pagination.
searchEventLogs()  : ClientResponse
Searches the event logs with the specified criteria and pagination.
searchGroupMembers()  : ClientResponse
Searches group members with the specified criteria and pagination.
searchGroups()  : ClientResponse
Searches groups with the specified criteria and pagination.
searchIdentityProviders()  : ClientResponse
Searches identity providers with the specified criteria and pagination.
searchIPAccessControlLists()  : ClientResponse
Searches the IP Access Control Lists with the specified criteria and pagination.
searchKeys()  : ClientResponse
Searches keys with the specified criteria and pagination.
searchLambdas()  : ClientResponse
Searches lambdas with the specified criteria and pagination.
searchLoginRecords()  : ClientResponse
Searches the login records with the specified criteria and pagination.
searchTenants()  : ClientResponse
Searches tenants with the specified criteria and pagination.
searchThemes()  : ClientResponse
Searches themes with the specified criteria and pagination.
searchUserComments()  : ClientResponse
Searches user comments with the specified criteria and pagination.
searchUsers()  : ClientResponse
Retrieves the users for the given ids. If any Id is invalid, it is ignored.
searchUsersByIds()  : ClientResponse
Retrieves the users for the given ids. If any Id is invalid, it is ignored.
searchUsersByQuery()  : ClientResponse
Retrieves the users for the given search criteria and pagination.
searchUsersByQueryString()  : ClientResponse
Retrieves the users for the given search criteria and pagination.
searchWebhooks()  : ClientResponse
Searches webhooks with the specified criteria and pagination.
sendEmail()  : ClientResponse
Send an email using an email template id. You can optionally provide <code>requestData</code> to access key value pairs in the email template.
sendFamilyRequestEmail()  : ClientResponse
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.
sendPasswordlessCode()  : ClientResponse
Send a passwordless authentication code in an email to complete login.
sendTwoFactorCode()  : ClientResponse
Send a Two Factor authentication code to assist in setting up Two Factor authentication or disabling.
sendTwoFactorCodeForEnableDisable()  : ClientResponse
Send a Two Factor authentication code to assist in setting up Two Factor authentication or disabling.
sendTwoFactorCodeForLogin()  : ClientResponse
Send a Two Factor authentication code to allow the completion of Two Factor authentication.
sendTwoFactorCodeForLoginUsingMethod()  : ClientResponse
Send a Two Factor authentication code to allow the completion of Two Factor authentication.
startIdentityProviderLogin()  : ClientResponse
Begins a login request for a 3rd party login that requires user interaction such as HYPR.
startPasswordlessLogin()  : ClientResponse
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.
startTwoFactorLogin()  : ClientResponse
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.
startWebAuthnLogin()  : ClientResponse
Start a WebAuthn authentication ceremony by generating a new challenge for the user
startWebAuthnRegistration()  : ClientResponse
Start a WebAuthn registration ceremony by generating a new challenge for the user
twoFactorLogin()  : ClientResponse
Complete login using a 2FA challenge
updateAPIKey()  : ClientResponse
Updates an API key by given id
updateApplication()  : ClientResponse
Updates the application with the given Id.
updateApplicationRole()  : ClientResponse
Updates the application role with the given Id for the application.
updateConnector()  : ClientResponse
Updates the connector with the given Id.
updateConsent()  : ClientResponse
Updates the consent with the given Id.
updateEmailTemplate()  : ClientResponse
Updates the email template with the given Id.
updateEntity()  : ClientResponse
Updates the Entity with the given Id.
updateEntityType()  : ClientResponse
Updates the Entity Type with the given Id.
updateEntityTypePermission()  : ClientResponse
Updates the permission with the given Id for the entity type.
updateForm()  : ClientResponse
Updates the form with the given Id.
updateFormField()  : ClientResponse
Updates the form field with the given Id.
updateGroup()  : ClientResponse
Updates the group with the given Id.
updateGroupMembers()  : ClientResponse
Creates a member in a group.
updateIdentityProvider()  : ClientResponse
Updates the identity provider with the given Id.
updateIntegrations()  : ClientResponse
Updates the available integrations.
updateIPAccessControlList()  : ClientResponse
Updates the IP Access Control List with the given Id.
updateKey()  : ClientResponse
Updates the key with the given Id.
updateLambda()  : ClientResponse
Updates the lambda with the given Id.
updateMessageTemplate()  : ClientResponse
Updates the message template with the given Id.
updateMessenger()  : ClientResponse
Updates the messenger with the given Id.
updateOAuthScope()  : ClientResponse
Updates the OAuth scope with the given Id for the application.
updateRegistration()  : ClientResponse
Updates the registration for the user with the given Id and the application defined in the request.
updateSystemConfiguration()  : ClientResponse
Updates the system configuration.
updateTenant()  : ClientResponse
Updates the tenant with the given Id.
updateTheme()  : ClientResponse
Updates the theme with the given Id.
updateUser()  : ClientResponse
Updates the user with the given Id.
updateUserAction()  : ClientResponse
Updates the user action with the given Id.
updateUserActionReason()  : ClientResponse
Updates the user action reason with the given Id.
updateUserConsent()  : ClientResponse
Updates a single User consent by Id.
updateWebhook()  : ClientResponse
Updates the webhook with the given Id.
upsertEntityGrant()  : ClientResponse
Creates or updates an Entity Grant. This is when a User/Entity is granted permissions to an Entity.
validateDevice()  : ClientResponse
Validates the end-user provided user_code from the user-interaction of the Device Authorization Grant.
validateJWT()  : ClientResponse
Validates the provided JWT (encoded JWT string) to ensure the token is valid. A valid access token is properly signed and not expired.
vendJWT()  : ClientResponse
It's a JWT vending machine!
verifyEmail()  : ClientResponse
Confirms a email verification. The Id given is usually from an email sent to the user.
verifyEmailAddress()  : ClientResponse
Confirms a user's email address.
verifyEmailAddressByUserId()  : ClientResponse
Administratively verify a user's email address. Use this method to bypass email verification for the user.
verifyRegistration()  : ClientResponse
Confirms an application registration. The Id given is usually from an email sent to the user.
verifyUserRegistration()  : ClientResponse
Confirms a user's registration.
withTenantId()  : mixed
start()  : mixed
startAnonymous()  : mixed

Properties

Methods

__construct()

public __construct(mixed $apiKey, mixed $baseURL) : mixed
Parameters
$apiKey : mixed
$baseURL : mixed

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.

public actionUser(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

activateReactor()

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

public activateReactor(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

addUserToFamily()

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

public addUserToFamily(string $familyId, array<string|int, mixed> $request) : ClientResponse
Parameters
$familyId : string

The Id of the family.

$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

approveDevice()

Approve a device grant.

public approveDevice(string $client_id, string $client_secret, string $token, string $user_code) : ClientResponse
Parameters
$client_id : string

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

$client_secret : string

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

$token : string

The access token used to identify the user.

$user_code : string

The end-user verification code.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

cancelAction()

Cancels the user action.

public cancelAction(string $actionId, array<string|int, mixed> $request) : ClientResponse
Parameters
$actionId : string

The action Id of the action to cancel.

$request : array<string|int, mixed>

The action request that contains the information about the cancellation.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

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.

public changePassword(string $changePasswordId, array<string|int, mixed> $request) : ClientResponse

As of version 1.32.2, prefer sending the changePasswordId in the request body. To do this, omit the first parameter, and set the value in the request body.

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 : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

changePasswordByIdentity()

Changes a user's password using their identity (loginId 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.

public changePasswordByIdentity(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

checkChangePasswordUsingId()

Check to see if the user must obtain a Trust Token Id in order to complete a change password request.

public checkChangePasswordUsingId(string $changePasswordId) : ClientResponse

When a user has enabled Two-Factor authentication, before you are allowed to use the Change Password API to change your password, you must obtain a Trust Token by completing a Two-Factor Step-Up authentication.

An HTTP status code of 400 with a general error code of [TrustTokenRequired] indicates that a Trust Token is required to make a POST request to this API.

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.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

checkChangePasswordUsingJWT()

Check to see if the user must obtain a Trust Token Id in order to complete a change password request.

public checkChangePasswordUsingJWT(string $encodedJWT) : ClientResponse

When a user has enabled Two-Factor authentication, before you are allowed to use the Change Password API to change your password, you must obtain a Trust Token by completing a Two-Factor Step-Up authentication.

An HTTP status code of 400 with a general error code of [TrustTokenRequired] indicates that a Trust Token is required to make a POST request to this API.

Parameters
$encodedJWT : string

The encoded JWT (access token).

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

checkChangePasswordUsingLoginId()

Check to see if the user must obtain a Trust Request Id in order to complete a change password request.

public checkChangePasswordUsingLoginId(string $loginId) : ClientResponse

When a user has enabled Two-Factor authentication, before you are allowed to use the Change Password API to change your password, you must obtain a Trust Request Id by completing a Two-Factor Step-Up authentication.

An HTTP status code of 400 with a general error code of [TrustTokenRequired] indicates that a Trust Token is required to make a POST request to this API.

Parameters
$loginId : string

The loginId of the User that you intend to change the password for.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

clientCredentialsGrant()

Make a Client Credentials grant request to obtain an access token.

public clientCredentialsGrant(string $client_id, string $client_secret[, string $scope = NULL ]) : ClientResponse
Parameters
$client_id : string

(Optional) The client identifier. The client Id is the Id of the FusionAuth Entity in which you are attempting to authenticate. This parameter is optional when Basic Authorization is used to authenticate this request.

$client_secret : string

(Optional) The client secret used to authenticate this request. This parameter is optional when Basic Authorization is used to authenticate this request.

$scope : string = NULL

(Optional) This parameter is used to indicate which target entity you are requesting access. To request access to an entity, use the format target-entity:<target-entity-id>:<roles>. Roles are an optional comma separated list.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

commentOnUser()

Adds a comment to the user's account.

public commentOnUser(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

completeWebAuthnAssertion()

Complete a WebAuthn authentication ceremony by validating the signature against the previously generated challenge without logging the user in

public completeWebAuthnAssertion(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

An object containing data necessary for completing the authentication ceremony

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

completeWebAuthnLogin()

Complete a WebAuthn authentication ceremony by validating the signature against the previously generated challenge and then login the user in

public completeWebAuthnLogin(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

An object containing data necessary for completing the authentication ceremony

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

completeWebAuthnRegistration()

Complete a WebAuthn registration ceremony by validating the client request and saving the new credential

public completeWebAuthnRegistration(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

An object containing data necessary for completing the registration ceremony

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

createAPIKey()

Creates an API key. You can optionally specify a unique Id for the key, if not provided one will be generated.

public createAPIKey(string $keyId, array<string|int, mixed> $request) : ClientResponse

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 : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

createApplication()

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

public createApplication(string $applicationId, array<string|int, mixed> $request) : ClientResponse
Parameters
$applicationId : string

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

$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

createApplicationRole()

Creates a new role for an application. You must specify the Id of the application you are creating the role for.

public createApplicationRole(string $applicationId, string $roleId, array<string|int, mixed> $request) : ClientResponse

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 : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

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.

public createAuditLog(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

createConnector()

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

public createConnector(string $connectorId, array<string|int, mixed> $request) : ClientResponse
Parameters
$connectorId : string

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

$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

createConsent()

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

public createConsent(string $consentId, array<string|int, mixed> $request) : ClientResponse
Parameters
$consentId : string

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

$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

createEmailTemplate()

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

public createEmailTemplate(string $emailTemplateId, array<string|int, mixed> $request) : ClientResponse
Parameters
$emailTemplateId : string

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

$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

createEntity()

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

public createEntity(string $entityId, array<string|int, mixed> $request) : ClientResponse
Parameters
$entityId : string

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

$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

createEntityType()

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

public createEntityType(string $entityTypeId, array<string|int, mixed> $request) : ClientResponse
Parameters
$entityTypeId : string

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

$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

createEntityTypePermission()

Creates a new permission for an entity type. You must specify the Id of the entity type you are creating the permission for.

public createEntityTypePermission(string $entityTypeId, string $permissionId, array<string|int, mixed> $request) : ClientResponse

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 : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

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.

public createFamily(string $familyId, array<string|int, mixed> $request) : ClientResponse
Parameters
$familyId : string

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

$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

createForm()

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

public createForm(string $formId, array<string|int, mixed> $request) : ClientResponse
Parameters
$formId : string

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

$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

createFormField()

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

public createFormField(string $fieldId, array<string|int, mixed> $request) : ClientResponse
Parameters
$fieldId : string

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

$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

createGroup()

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

public createGroup(string $groupId, array<string|int, mixed> $request) : ClientResponse
Parameters
$groupId : string

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

$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

createGroupMembers()

Creates a member in a group.

public createGroupMembers(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

createIdentityProvider()

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

public createIdentityProvider(string $identityProviderId, array<string|int, mixed> $request) : ClientResponse
Parameters
$identityProviderId : string

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

$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

createIPAccessControlList()

Creates an IP Access Control List. You can optionally specify an Id on this create request, if one is not provided one will be generated.

public createIPAccessControlList(string $accessControlListId, array<string|int, mixed> $request) : ClientResponse
Parameters
$accessControlListId : string

(Optional) The Id for the IP Access Control List. If not provided a secure random UUID will be generated.

$request : array<string|int, mixed>

The request object that contains all the information used to create the IP Access Control List.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

createLambda()

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

public createLambda(string $lambdaId, array<string|int, mixed> $request) : ClientResponse
Parameters
$lambdaId : string

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

$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

createMessageTemplate()

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

public createMessageTemplate(string $messageTemplateId, array<string|int, mixed> $request) : ClientResponse
Parameters
$messageTemplateId : string

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

$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

createMessenger()

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

public createMessenger(string $messengerId, array<string|int, mixed> $request) : ClientResponse
Parameters
$messengerId : string

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

$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

createOAuthScope()

Creates a new custom OAuth scope for an application. You must specify the Id of the application you are creating the scope for.

public createOAuthScope(string $applicationId, string $scopeId, array<string|int, mixed> $request) : ClientResponse

You can optionally specify an Id for the OAuth scope on the URL, if not provided one will be generated.

Parameters
$applicationId : string

The Id of the application to create the OAuth scope on.

$scopeId : string

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

$request : array<string|int, mixed>

The request object that contains all the information used to create the OAuth OAuth scope.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

createTenant()

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

public createTenant(string $tenantId, array<string|int, mixed> $request) : ClientResponse
Parameters
$tenantId : string

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

$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

createTheme()

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

public createTheme(string $themeId, array<string|int, mixed> $request) : ClientResponse
Parameters
$themeId : string

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

$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

createUser()

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

public createUser(string $userId, array<string|int, mixed> $request) : ClientResponse
Parameters
$userId : string

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

$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

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.

public createUserAction(string $userActionId, array<string|int, mixed> $request) : ClientResponse
Parameters
$userActionId : string

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

$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

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.

public createUserActionReason(string $userActionReasonId, array<string|int, mixed> $request) : ClientResponse
Parameters
$userActionReasonId : string

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

$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

createUserConsent()

Creates a single User consent.

public createUserConsent(string $userConsentId, array<string|int, mixed> $request) : ClientResponse
Parameters
$userConsentId : string

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

$request : array<string|int, mixed>

The request that contains the user consent information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

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

public createUserLink(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

The request object that contains all the information used to link the FusionAuth user.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

createWebhook()

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

public createWebhook(string $webhookId, array<string|int, mixed> $request) : ClientResponse
Parameters
$webhookId : string

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

$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

deactivateApplication()

Deactivates the application with the given Id.

public deactivateApplication(string $applicationId) : ClientResponse
Parameters
$applicationId : string

The Id of the application to deactivate.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

deactivateUser()

Deactivates the user with the given Id.

public deactivateUser(string $userId) : ClientResponse
Parameters
$userId : string

The Id of the user to deactivate.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

deactivateUserAction()

Deactivates the user action with the given Id.

public deactivateUserAction(string $userActionId) : ClientResponse
Parameters
$userActionId : string

The Id of the user action to deactivate.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

deactivateUsers()

Deactivates the users with the given ids.

public deactivateUsers(array<string|int, mixed> $userIds) : ClientResponse

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

Parameters
$userIds : array<string|int, mixed>

The ids of the users to deactivate.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

deactivateUsersByIds()

Deactivates the users with the given ids.

public deactivateUsersByIds(array<string|int, mixed> $userIds) : ClientResponse
Parameters
$userIds : array<string|int, mixed>

The ids of the users to deactivate.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

deleteAPIKey()

Deletes the API key for the given Id.

public deleteAPIKey(string $keyId) : ClientResponse
Parameters
$keyId : string

The Id of the authentication API key to delete.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

deleteApplication()

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.

public deleteApplication(string $applicationId) : ClientResponse
Parameters
$applicationId : string

The Id of the application to delete.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

deleteApplicationRole()

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.

public deleteApplicationRole(string $applicationId, string $roleId) : ClientResponse
Parameters
$applicationId : string

The Id of the application that the role belongs to.

$roleId : string

The Id of the role to delete.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

deleteConnector()

Deletes the connector for the given Id.

public deleteConnector(string $connectorId) : ClientResponse
Parameters
$connectorId : string

The Id of the connector to delete.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

deleteConsent()

Deletes the consent for the given Id.

public deleteConsent(string $consentId) : ClientResponse
Parameters
$consentId : string

The Id of the consent to delete.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

deleteEmailTemplate()

Deletes the email template for the given Id.

public deleteEmailTemplate(string $emailTemplateId) : ClientResponse
Parameters
$emailTemplateId : string

The Id of the email template to delete.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

deleteEntity()

Deletes the Entity for the given Id.

public deleteEntity(string $entityId) : ClientResponse
Parameters
$entityId : string

The Id of the Entity to delete.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

deleteEntityGrant()

Deletes an Entity Grant for the given User or Entity.

public deleteEntityGrant(string $entityId, string $recipientEntityId[, string $userId = NULL ]) : ClientResponse
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 = NULL

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

deleteEntityType()

Deletes the Entity Type for the given Id.

public deleteEntityType(string $entityTypeId) : ClientResponse
Parameters
$entityTypeId : string

The Id of the Entity Type to delete.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

deleteEntityTypePermission()

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.

public deleteEntityTypePermission(string $entityTypeId, string $permissionId) : ClientResponse
Parameters
$entityTypeId : string

The Id of the entityType the the permission belongs to.

$permissionId : string

The Id of the permission to delete.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

deleteForm()

Deletes the form for the given Id.

public deleteForm(string $formId) : ClientResponse
Parameters
$formId : string

The Id of the form to delete.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

deleteFormField()

Deletes the form field for the given Id.

public deleteFormField(string $fieldId) : ClientResponse
Parameters
$fieldId : string

The Id of the form field to delete.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

deleteGroup()

Deletes the group for the given Id.

public deleteGroup(string $groupId) : ClientResponse
Parameters
$groupId : string

The Id of the group to delete.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

deleteGroupMembers()

Removes users as members of a group.

public deleteGroupMembers(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

deleteIdentityProvider()

Deletes the identity provider for the given Id.

public deleteIdentityProvider(string $identityProviderId) : ClientResponse
Parameters
$identityProviderId : string

The Id of the identity provider to delete.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

deleteIPAccessControlList()

Deletes the IP Access Control List for the given Id.

public deleteIPAccessControlList(string $ipAccessControlListId) : ClientResponse
Parameters
$ipAccessControlListId : string

The Id of the IP Access Control List to delete.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

deleteKey()

Deletes the key for the given Id.

public deleteKey(string $keyId) : ClientResponse
Parameters
$keyId : string

The Id of the key to delete.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

deleteLambda()

Deletes the lambda for the given Id.

public deleteLambda(string $lambdaId) : ClientResponse
Parameters
$lambdaId : string

The Id of the lambda to delete.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

deleteMessageTemplate()

Deletes the message template for the given Id.

public deleteMessageTemplate(string $messageTemplateId) : ClientResponse
Parameters
$messageTemplateId : string

The Id of the message template to delete.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

deleteMessenger()

Deletes the messenger for the given Id.

public deleteMessenger(string $messengerId) : ClientResponse
Parameters
$messengerId : string

The Id of the messenger to delete.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

deleteOAuthScope()

Hard deletes a custom OAuth scope.

public deleteOAuthScope(string $applicationId, string $scopeId) : ClientResponse

OAuth workflows that are still requesting the deleted OAuth scope may fail depending on the application's unknown scope policy.

Parameters
$applicationId : string

The Id of the application that the OAuth scope belongs to.

$scopeId : string

The Id of the OAuth scope to delete.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

deleteRegistration()

Deletes the user registration for the given user and application.

public deleteRegistration(string $userId, string $applicationId) : ClientResponse
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.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

deleteRegistrationWithRequest()

Deletes the user registration for the given user and application along with the given JSON body that contains the event information.

public deleteRegistrationWithRequest(string $userId, string $applicationId, array<string|int, mixed> $request) : ClientResponse
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.

$request : array<string|int, mixed>

The request body that contains the event information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

deleteTenant()

Deletes the tenant based on the given Id on the URL. This permanently deletes all information, metrics, reports and data associated with the tenant and everything under the tenant (applications, users, etc).

public deleteTenant(string $tenantId) : ClientResponse
Parameters
$tenantId : string

The Id of the tenant to delete.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

deleteTenantAsync()

Deletes the tenant for the given Id asynchronously.

public deleteTenantAsync(string $tenantId) : ClientResponse

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.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

deleteTenantWithRequest()

Deletes the tenant based on the given request (sent to the API as JSON). This permanently deletes all information, metrics, reports and data associated with the tenant and everything under the tenant (applications, users, etc).

public deleteTenantWithRequest(string $tenantId, array<string|int, mixed> $request) : ClientResponse
Parameters
$tenantId : string

The Id of the tenant to delete.

$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

deleteTheme()

Deletes the theme for the given Id.

public deleteTheme(string $themeId) : ClientResponse
Parameters
$themeId : string

The Id of the theme to delete.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

deleteUser()

Deletes the user for the given Id. This permanently deletes all information, metrics, reports and data associated with the user.

public deleteUser(string $userId) : ClientResponse
Parameters
$userId : string

The Id of the user to delete.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

deleteUserAction()

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.

public deleteUserAction(string $userActionId) : ClientResponse
Parameters
$userActionId : string

The Id of the user action to delete.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

deleteUserActionReason()

Deletes the user action reason for the given Id.

public deleteUserActionReason(string $userActionReasonId) : ClientResponse
Parameters
$userActionReasonId : string

The Id of the user action reason to delete.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

Remove an existing link that has been made from a 3rd party identity provider to a FusionAuth user.

public deleteUserLink(string $identityProviderId, string $identityProviderUserId, string $userId) : ClientResponse
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.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

deleteUsers()

Deletes the users with the given ids, or users matching the provided JSON query or queryString.

public deleteUsers(array<string|int, mixed> $request) : ClientResponse

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

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
$request : array<string|int, mixed>

The UserDeleteRequest.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

deleteUsersByQuery()

Deletes the users with the given ids, or users matching the provided JSON query or queryString.

public deleteUsersByQuery(array<string|int, mixed> $request) : ClientResponse

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
$request : array<string|int, mixed>

The UserDeleteRequest.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

deleteUserWithRequest()

Deletes the user based on the given request (sent to the API as JSON). This permanently deletes all information, metrics, reports and data associated with the user.

public deleteUserWithRequest(string $userId, array<string|int, mixed> $request) : ClientResponse
Parameters
$userId : string

The Id of the user to delete (required).

$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

deleteWebAuthnCredential()

Deletes the WebAuthn credential for the given Id.

public deleteWebAuthnCredential(string $id) : ClientResponse
Parameters
$id : string

The Id of the WebAuthn credential to delete.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

deleteWebhook()

Deletes the webhook for the given Id.

public deleteWebhook(string $webhookId) : ClientResponse
Parameters
$webhookId : string

The Id of the webhook to delete.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

disableTwoFactor()

Disable two-factor authentication for a user.

public disableTwoFactor(string $userId, string $methodId, string $code) : ClientResponse
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.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

disableTwoFactorWithRequest()

Disable two-factor authentication for a user using a JSON body rather than URL parameters.

public disableTwoFactorWithRequest(string $userId, array<string|int, mixed> $request) : ClientResponse
Parameters
$userId : string

The Id of the User for which you're disabling two-factor authentication.

$request : array<string|int, mixed>

The request information that contains the code and methodId along with any event information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

enableTwoFactor()

Enable two-factor authentication for a user.

public enableTwoFactor(string $userId, array<string|int, mixed> $request) : ClientResponse
Parameters
$userId : string

The Id of the user to enable two-factor authentication.

$request : array<string|int, mixed>

The two-factor enable request information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

exchangeOAuthCodeForAccessToken()

Exchanges an OAuth authorization code for an access token.

public exchangeOAuthCodeForAccessToken(string $code, string $client_id, string $client_secret, string $redirect_uri) : ClientResponse

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

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

$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.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

exchangeOAuthCodeForAccessTokenUsingPKCE()

Exchanges an OAuth authorization code and code_verifier for an access token.

public exchangeOAuthCodeForAccessTokenUsingPKCE(string $code, string $client_id, string $client_secret, string $redirect_uri, string $code_verifier) : ClientResponse

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 are attempting to authenticate. This parameter is optional when the Authorization header is provided. This parameter is optional when Basic Authorization is used to authenticate this request.

$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.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

exchangeRefreshTokenForAccessToken()

Exchange a Refresh Token for an Access Token.

public exchangeRefreshTokenForAccessToken(string $refresh_token, string $client_id, string $client_secret, string $scope[, string $user_code = NULL ]) : ClientResponse

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 are attempting to authenticate. This parameter is optional when the Authorization header is provided. This parameter is optional when Basic Authorization is used to authenticate this request.

$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 = NULL

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

exchangeRefreshTokenForJWT()

Exchange a refresh token for a new JWT.

public exchangeRefreshTokenForJWT(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

The refresh request.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

exchangeUserCredentialsForAccessToken()

Exchange User Credentials for a Token.

public exchangeUserCredentialsForAccessToken(string $username, string $password, string $client_id, string $client_secret, string $scope[, string $user_code = NULL ]) : ClientResponse

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 are attempting to authenticate. This parameter is optional when the Authorization header is provided. This parameter is optional when Basic Authorization is used to authenticate this request.

$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 = NULL

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

forgotPassword()

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

public forgotPassword(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

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.

public generateEmailVerificationId(string $email) : ClientResponse
Parameters
$email : string

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

generateKey()

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

public generateKey(string $keyId, array<string|int, mixed> $request) : ClientResponse
Parameters
$keyId : string

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

$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

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.

public generateRegistrationVerificationId(string $email, string $applicationId) : ClientResponse
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.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

generateTwoFactorRecoveryCodes()

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

public generateTwoFactorRecoveryCodes(string $userId) : ClientResponse
Parameters
$userId : string

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

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.

public generateTwoFactorSecret() : ClientResponse
Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

generateTwoFactorSecretUsingJWT()

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.

public generateTwoFactorSecretUsingJWT(string $encodedJWT) : ClientResponse
Parameters
$encodedJWT : string

The encoded JWT (access token).

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

identityProviderLogin()

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

public identityProviderLogin(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

importKey()

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

public importKey(string $keyId, array<string|int, mixed> $request) : ClientResponse
Parameters
$keyId : string

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

$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

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.

public importRefreshTokens(array<string|int, mixed> $request) : ClientResponse

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 : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

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.

public importUsers(array<string|int, mixed> $request) : ClientResponse

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 : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

importWebAuthnCredential()

Import a WebAuthn credential

public importWebAuthnCredential(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

An object containing data necessary for importing the credential

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

introspectAccessToken()

Inspect an access token issued as the result of the User based grant such as the Authorization Code Grant, Implicit Grant, the User Credentials Grant or the Refresh Grant.

public introspectAccessToken(string $client_id, string $token) : ClientResponse
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 client credentials grant.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

introspectClientCredentialsAccessToken()

Inspect an access token issued as the result of the Client Credentials Grant.

public introspectClientCredentialsAccessToken(string $token) : ClientResponse
Parameters
$token : string

The access token returned by this OAuth provider as the result of a successful client credentials grant.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

issueJWT()

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.

public issueJWT(string $applicationId, string $encodedJWT[, string $refreshToken = NULL ]) : ClientResponse

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 = NULL

(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.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

login()

Authenticates a user to FusionAuth.

public login(array<string|int, mixed> $request) : ClientResponse

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

Parameters
$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

loginPing()

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.

public loginPing(string $userId, string $applicationId[, string $callerIPAddress = NULL ]) : ClientResponse
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 = NULL

(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.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

loginPingWithRequest()

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.

public loginPingWithRequest(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

logout()

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.

public logout(bool $global[, string $refreshToken = NULL ]) : ClientResponse
Parameters
$global : bool

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

$refreshToken : string = NULL

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

logoutWithRequest()

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 takes the refresh token in the JSON body.

public logoutWithRequest(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

lookupIdentityProvider()

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.

public lookupIdentityProvider(string $domain) : ClientResponse
Parameters
$domain : string

The domain or email address to lookup.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

modifyAction()

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

public modifyAction(string $actionId, array<string|int, mixed> $request) : ClientResponse
Parameters
$actionId : string

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

$request : array<string|int, mixed>

The request that contains all the information about the modification.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

passwordlessLogin()

Complete a login request using a passwordless code

public passwordlessLogin(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

patchAPIKey()

Updates an authentication API key by given id

public patchAPIKey(string $keyId, array<string|int, mixed> $request) : ClientResponse
Parameters
$keyId : string

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

$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

patchApplication()

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

public patchApplication(string $applicationId, array<string|int, mixed> $request) : ClientResponse
Parameters
$applicationId : string

The Id of the application to update.

$request : array<string|int, mixed>

The request that contains just the new application information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

patchApplicationRole()

Updates, via PATCH, the application role with the given Id for the application.

public patchApplicationRole(string $applicationId, string $roleId, array<string|int, mixed> $request) : ClientResponse
Parameters
$applicationId : string

The Id of the application that the role belongs to.

$roleId : string

The Id of the role to update.

$request : array<string|int, mixed>

The request that contains just the new role information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

patchConnector()

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

public patchConnector(string $connectorId, array<string|int, mixed> $request) : ClientResponse
Parameters
$connectorId : string

The Id of the connector to update.

$request : array<string|int, mixed>

The request that contains just the new connector information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

patchConsent()

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

public patchConsent(string $consentId, array<string|int, mixed> $request) : ClientResponse
Parameters
$consentId : string

The Id of the consent to update.

$request : array<string|int, mixed>

The request that contains just the new consent information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

patchEmailTemplate()

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

public patchEmailTemplate(string $emailTemplateId, array<string|int, mixed> $request) : ClientResponse
Parameters
$emailTemplateId : string

The Id of the email template to update.

$request : array<string|int, mixed>

The request that contains just the new email template information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

patchEntityType()

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

public patchEntityType(string $entityTypeId, array<string|int, mixed> $request) : ClientResponse
Parameters
$entityTypeId : string

The Id of the Entity Type to update.

$request : array<string|int, mixed>

The request that contains just the new Entity Type information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

patchGroup()

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

public patchGroup(string $groupId, array<string|int, mixed> $request) : ClientResponse
Parameters
$groupId : string

The Id of the group to update.

$request : array<string|int, mixed>

The request that contains just the new group information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

patchIdentityProvider()

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

public patchIdentityProvider(string $identityProviderId, array<string|int, mixed> $request) : ClientResponse
Parameters
$identityProviderId : string

The Id of the identity provider to update.

$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

patchIntegrations()

Updates, via PATCH, the available integrations.

public patchIntegrations(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

The request that contains just the new integration information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

patchLambda()

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

public patchLambda(string $lambdaId, array<string|int, mixed> $request) : ClientResponse
Parameters
$lambdaId : string

The Id of the lambda to update.

$request : array<string|int, mixed>

The request that contains just the new lambda information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

patchMessageTemplate()

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

public patchMessageTemplate(string $messageTemplateId, array<string|int, mixed> $request) : ClientResponse
Parameters
$messageTemplateId : string

The Id of the message template to update.

$request : array<string|int, mixed>

The request that contains just the new message template information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

patchMessenger()

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

public patchMessenger(string $messengerId, array<string|int, mixed> $request) : ClientResponse
Parameters
$messengerId : string

The Id of the messenger to update.

$request : array<string|int, mixed>

The request that contains just the new messenger information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

patchOAuthScope()

Updates, via PATCH, the custom OAuth scope with the given Id for the application.

public patchOAuthScope(string $applicationId, string $scopeId, array<string|int, mixed> $request) : ClientResponse
Parameters
$applicationId : string

The Id of the application that the OAuth scope belongs to.

$scopeId : string

The Id of the OAuth scope to update.

$request : array<string|int, mixed>

The request that contains just the new OAuth scope information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

patchRegistration()

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

public patchRegistration(string $userId, array<string|int, mixed> $request) : ClientResponse
Parameters
$userId : string

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

$request : array<string|int, mixed>

The request that contains just the new registration information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

patchSystemConfiguration()

Updates, via PATCH, the system configuration.

public patchSystemConfiguration(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

The request that contains just the new system configuration information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

patchTenant()

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

public patchTenant(string $tenantId, array<string|int, mixed> $request) : ClientResponse
Parameters
$tenantId : string

The Id of the tenant to update.

$request : array<string|int, mixed>

The request that contains just the new tenant information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

patchTheme()

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

public patchTheme(string $themeId, array<string|int, mixed> $request) : ClientResponse
Parameters
$themeId : string

The Id of the theme to update.

$request : array<string|int, mixed>

The request that contains just the new theme information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

patchUser()

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

public patchUser(string $userId, array<string|int, mixed> $request) : ClientResponse
Parameters
$userId : string

The Id of the user to update.

$request : array<string|int, mixed>

The request that contains just the new user information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

patchUserAction()

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

public patchUserAction(string $userActionId, array<string|int, mixed> $request) : ClientResponse
Parameters
$userActionId : string

The Id of the user action to update.

$request : array<string|int, mixed>

The request that contains just the new user action information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

patchUserActionReason()

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

public patchUserActionReason(string $userActionReasonId, array<string|int, mixed> $request) : ClientResponse
Parameters
$userActionReasonId : string

The Id of the user action reason to update.

$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

patchUserConsent()

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

public patchUserConsent(string $userConsentId, array<string|int, mixed> $request) : ClientResponse
Parameters
$userConsentId : string

The User Consent Id

$request : array<string|int, mixed>

The request that contains just the new user consent information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

reactivateApplication()

Reactivates the application with the given Id.

public reactivateApplication(string $applicationId) : ClientResponse
Parameters
$applicationId : string

The Id of the application to reactivate.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

reactivateUser()

Reactivates the user with the given Id.

public reactivateUser(string $userId) : ClientResponse
Parameters
$userId : string

The Id of the user to reactivate.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

reactivateUserAction()

Reactivates the user action with the given Id.

public reactivateUserAction(string $userActionId) : ClientResponse
Parameters
$userActionId : string

The Id of the user action to reactivate.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

reconcileJWT()

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

public reconcileJWT(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

The reconcile request that contains the data to reconcile the User.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

refreshEntitySearchIndex()

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.

public refreshEntitySearchIndex() : ClientResponse
Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

refreshUserSearchIndex()

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.

public refreshUserSearchIndex() : ClientResponse
Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

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.

public register(string $userId, array<string|int, mixed> $request) : ClientResponse
Parameters
$userId : string

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

$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

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.

public reindex(array<string|int, mixed> $request) : ClientResponse

You have been warned.

Parameters
$request : array<string|int, mixed>

The request that contains the index name.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

removeUserFromFamily()

Removes a user from the family with the given id.

public removeUserFromFamily(string $familyId, string $userId) : ClientResponse
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.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

resendEmailVerification()

Re-sends the verification email to the user.

public resendEmailVerification(string $email) : ClientResponse
Parameters
$email : string

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

resendEmailVerificationWithApplicationTemplate()

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.

public resendEmailVerificationWithApplicationTemplate(string $applicationId, string $email) : ClientResponse
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.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

resendRegistrationVerification()

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

public resendRegistrationVerification(string $email, string $applicationId) : ClientResponse
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.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveAction()

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

public retrieveAction(string $actionId) : ClientResponse
Parameters
$actionId : string

The Id of the action to retrieve.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveActions()

Retrieves all 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.

public retrieveActions(string $userId) : ClientResponse
Parameters
$userId : string

The Id of the user to fetch the actions for.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveActionsPreventingLogin()

Retrieves all the actions for the user with the given Id that are currently preventing the User from logging in.

public retrieveActionsPreventingLogin(string $userId) : ClientResponse
Parameters
$userId : string

The Id of the user to fetch the actions for.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveActiveActions()

Retrieves all the actions for the user with the given Id that are currently active.

public retrieveActiveActions(string $userId) : ClientResponse

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.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveAPIKey()

Retrieves an authentication API key for the given id

public retrieveAPIKey(string $keyId) : ClientResponse
Parameters
$keyId : string

The Id of the API key to retrieve.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveApplication()

Retrieves the application for the given Id or all the applications if the Id is null.

public retrieveApplication([string $applicationId = NULL ]) : ClientResponse
Parameters
$applicationId : string = NULL

(Optional) The application id.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveAuditLog()

Retrieves a single audit log for the given Id.

public retrieveAuditLog(int $auditLogId) : ClientResponse
Parameters
$auditLogId : int

The Id of the audit log to retrieve.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveConnector()

Retrieves the connector with the given Id.

public retrieveConnector(string $connectorId) : ClientResponse
Parameters
$connectorId : string

The Id of the connector.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveConsent()

Retrieves the Consent for the given Id.

public retrieveConsent(string $consentId) : ClientResponse
Parameters
$consentId : string

The Id of the consent.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

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.

public retrieveDailyActiveReport(string $applicationId, array<string|int, mixed> $start, array<string|int, mixed> $end) : ClientResponse
Parameters
$applicationId : string

(Optional) The application id.

$start : array<string|int, mixed>

The start instant as UTC milliseconds since Epoch.

$end : array<string|int, mixed>

The end instant as UTC milliseconds since Epoch.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveEmailTemplate()

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

public retrieveEmailTemplate([string $emailTemplateId = NULL ]) : ClientResponse
Parameters
$emailTemplateId : string = NULL

(Optional) The Id of the email template.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

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.

public retrieveEmailTemplatePreview(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveEntity()

Retrieves the Entity for the given Id.

public retrieveEntity(string $entityId) : ClientResponse
Parameters
$entityId : string

The Id of the Entity.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveEntityGrant()

Retrieves an Entity Grant for the given Entity and User/Entity.

public retrieveEntityGrant(string $entityId, string $recipientEntityId[, string $userId = NULL ]) : ClientResponse
Parameters
$entityId : string

The Id of the Entity.

$recipientEntityId : string

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

$userId : string = NULL

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveEntityType()

Retrieves the Entity Type for the given Id.

public retrieveEntityType(string $entityTypeId) : ClientResponse
Parameters
$entityTypeId : string

The Id of the Entity Type.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveEventLog()

Retrieves a single event log for the given Id.

public retrieveEventLog(int $eventLogId) : ClientResponse
Parameters
$eventLogId : int

The Id of the event log to retrieve.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveFamilies()

Retrieves all the families that a user belongs to.

public retrieveFamilies(string $userId) : ClientResponse
Parameters
$userId : string

The User's id

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveFamilyMembersByFamilyId()

Retrieves all the members of a family by the unique Family Id.

public retrieveFamilyMembersByFamilyId(string $familyId) : ClientResponse
Parameters
$familyId : string

The unique Id of the Family.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveForm()

Retrieves the form with the given Id.

public retrieveForm(string $formId) : ClientResponse
Parameters
$formId : string

The Id of the form.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveFormField()

Retrieves the form field with the given Id.

public retrieveFormField(string $fieldId) : ClientResponse
Parameters
$fieldId : string

The Id of the form field.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveGroup()

Retrieves the group for the given Id.

public retrieveGroup(string $groupId) : ClientResponse
Parameters
$groupId : string

The Id of the group.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveIdentityProvider()

Retrieves the identity provider for the given Id or all the identity providers if the Id is null.

public retrieveIdentityProvider(string $identityProviderId) : ClientResponse
Parameters
$identityProviderId : string

The identity provider Id.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

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.

public retrieveIdentityProviderByType(array<string|int, mixed> $type) : ClientResponse
Parameters
$type : array<string|int, mixed>

The type of the identity provider.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveInactiveActions()

Retrieves all the actions for the user with the given Id that are currently inactive.

public retrieveInactiveActions(string $userId) : ClientResponse

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.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveInactiveApplications()

Retrieves all the applications that are currently inactive.

public retrieveInactiveApplications() : ClientResponse
Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveInactiveUserActions()

Retrieves all the user actions that are currently inactive.

public retrieveInactiveUserActions() : ClientResponse
Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveIPAccessControlList()

Retrieves the IP Access Control List with the given Id.

public retrieveIPAccessControlList(string $ipAccessControlListId) : ClientResponse
Parameters
$ipAccessControlListId : string

The Id of the IP Access Control List.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveJsonWebKeySet()

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

public retrieveJsonWebKeySet() : ClientResponse
Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveJWTPublicKey()

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

public retrieveJWTPublicKey(string $keyId) : ClientResponse
Parameters
$keyId : string

The Id of the public key (kid).

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveJWTPublicKeyByApplicationId()

Retrieves the Public Key configured for verifying the JSON Web Tokens (JWT) issued by the Login API by the Application Id.

public retrieveJWTPublicKeyByApplicationId(string $applicationId) : ClientResponse
Parameters
$applicationId : string

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveJWTPublicKeys()

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

public retrieveJWTPublicKeys() : ClientResponse
Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveKey()

Retrieves the key for the given Id.

public retrieveKey(string $keyId) : ClientResponse
Parameters
$keyId : string

The Id of the key.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveLambda()

Retrieves the lambda for the given Id.

public retrieveLambda(string $lambdaId) : ClientResponse
Parameters
$lambdaId : string

The Id of the lambda.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveLambdasByType()

Retrieves all the lambdas for the provided type.

public retrieveLambdasByType(array<string|int, mixed> $type) : ClientResponse
Parameters
$type : array<string|int, mixed>

The type of the lambda to return.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveLoginReport()

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

public retrieveLoginReport(string $applicationId, array<string|int, mixed> $start, array<string|int, mixed> $end) : ClientResponse
Parameters
$applicationId : string

(Optional) The application id.

$start : array<string|int, mixed>

The start instant as UTC milliseconds since Epoch.

$end : array<string|int, mixed>

The end instant as UTC milliseconds since Epoch.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveMessageTemplate()

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

public retrieveMessageTemplate([string $messageTemplateId = NULL ]) : ClientResponse
Parameters
$messageTemplateId : string = NULL

(Optional) The Id of the message template.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveMessageTemplatePreview()

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

public retrieveMessageTemplatePreview(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveMessenger()

Retrieves the messenger with the given Id.

public retrieveMessenger(string $messengerId) : ClientResponse
Parameters
$messengerId : string

The Id of the messenger.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

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.

public retrieveMonthlyActiveReport(string $applicationId, array<string|int, mixed> $start, array<string|int, mixed> $end) : ClientResponse
Parameters
$applicationId : string

(Optional) The application id.

$start : array<string|int, mixed>

The start instant as UTC milliseconds since Epoch.

$end : array<string|int, mixed>

The end instant as UTC milliseconds since Epoch.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveOauthConfiguration()

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

public retrieveOauthConfiguration(string $applicationId) : ClientResponse
Parameters
$applicationId : string

The Id of the Application to retrieve OAuth configuration.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveOAuthScope()

Retrieves a custom OAuth scope.

public retrieveOAuthScope(string $applicationId, string $scopeId) : ClientResponse
Parameters
$applicationId : string

The Id of the application that the OAuth scope belongs to.

$scopeId : string

The Id of the OAuth scope to retrieve.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveOpenIdConfiguration()

Returns the well known OpenID Configuration JSON document

public retrieveOpenIdConfiguration() : ClientResponse
Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

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.

public retrievePasswordValidationRules() : ClientResponse

This API does not require an API key.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrievePasswordValidationRulesWithTenantId()

Retrieves the password validation rules for a specific tenant.

public retrievePasswordValidationRulesWithTenantId(string $tenantId) : ClientResponse

This API does not require an API key.

Parameters
$tenantId : string

The Id of the tenant.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrievePendingChildren()

Retrieves all the children for the given parent email address.

public retrievePendingChildren(string $parentEmail) : ClientResponse
Parameters
$parentEmail : string

The email of the parent.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

Retrieve a pending identity provider link. This is useful to validate a pending link and retrieve meta-data about the identity provider link.

public retrievePendingLink(string $pendingLinkId, string $userId) : ClientResponse
Parameters
$pendingLinkId : string

The pending link Id.

$userId : string

The optional userId. When provided additional meta-data will be provided to identify how many links if any the user already has.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveRecentLogins()

Retrieves the last number of login records.

public retrieveRecentLogins(int $offset, int $limit) : ClientResponse
Parameters
$offset : int

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

$limit : int

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

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.

public retrieveRefreshTokenById(string $tokenId) : ClientResponse
Parameters
$tokenId : string

The Id of the token.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveRefreshTokens()

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

public retrieveRefreshTokens(string $userId) : ClientResponse
Parameters
$userId : string

The Id of the user.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveRegistration()

Retrieves the user registration for the user with the given Id and the given application id.

public retrieveRegistration(string $userId, string $applicationId) : ClientResponse
Parameters
$userId : string

The Id of the user.

$applicationId : string

The Id of the application.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

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.

public retrieveRegistrationReport(string $applicationId, array<string|int, mixed> $start, array<string|int, mixed> $end) : ClientResponse
Parameters
$applicationId : string

(Optional) The application id.

$start : array<string|int, mixed>

The start instant as UTC milliseconds since Epoch.

$end : array<string|int, mixed>

The end instant as UTC milliseconds since Epoch.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveReindexStatus()

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.

public retrieveReindexStatus() : ClientResponse
Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveSystemHealth()

Retrieves the FusionAuth system health. This API will return 200 if the system is healthy, and 500 if the system is un-healthy.

public retrieveSystemHealth() : ClientResponse
Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveSystemStatus()

Retrieves the FusionAuth system status. This request is anonymous and does not require an API key. When an API key is not provided the response will contain a single value in the JSON response indicating the current health check.

public retrieveSystemStatus() : ClientResponse
Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveSystemStatusUsingAPIKey()

Retrieves the FusionAuth system status using an API key. Using an API key will cause the response to include the product version, health checks and various runtime metrics.

public retrieveSystemStatusUsingAPIKey() : ClientResponse
Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveTenant()

Retrieves the tenant for the given Id.

public retrieveTenant(string $tenantId) : ClientResponse
Parameters
$tenantId : string

The Id of the tenant.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveTheme()

Retrieves the theme for the given Id.

public retrieveTheme(string $themeId) : ClientResponse
Parameters
$themeId : string

The Id of the theme.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveTotalReport()

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

public retrieveTotalReport() : ClientResponse
Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveTwoFactorRecoveryCodes()

Retrieve two-factor recovery codes for a user.

public retrieveTwoFactorRecoveryCodes(string $userId) : ClientResponse
Parameters
$userId : string

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveTwoFactorStatus()

Retrieve a user's two-factor status.

public retrieveTwoFactorStatus(string $userId, string $applicationId, string $twoFactorTrustId) : ClientResponse

This can be used to see if a user will need to complete a two-factor challenge to complete a login, and optionally identify the state of the two-factor trust across various applications.

Parameters
$userId : string

The user Id to retrieve the Two-Factor status.

$applicationId : string

The optional applicationId to verify.

$twoFactorTrustId : string

The optional two-factor trust Id to verify.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveUser()

Retrieves the user for the given Id.

public retrieveUser(string $userId) : ClientResponse
Parameters
$userId : string

The Id of the user.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveUserAction()

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

public retrieveUserAction([string $userActionId = NULL ]) : ClientResponse
Parameters
$userActionId : string = NULL

(Optional) The Id of the user action.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveUserActionReason()

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

public retrieveUserActionReason([string $userActionReasonId = NULL ]) : ClientResponse
Parameters
$userActionReasonId : string = NULL

(Optional) The Id of the user action reason.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveUserByChangePasswordId()

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.

public retrieveUserByChangePasswordId(string $changePasswordId) : ClientResponse
Parameters
$changePasswordId : string

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveUserByEmail()

Retrieves the user for the given email.

public retrieveUserByEmail(string $email) : ClientResponse
Parameters
$email : string

The email of the user.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveUserByLoginId()

Retrieves the user for the loginId. The loginId can be either the username or the email.

public retrieveUserByLoginId(string $loginId) : ClientResponse
Parameters
$loginId : string

The email or username of the user.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveUserByUsername()

Retrieves the user for the given username.

public retrieveUserByUsername(string $username) : ClientResponse
Parameters
$username : string

The username of the user.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveUserByVerificationId()

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.

public retrieveUserByVerificationId(string $verificationId) : ClientResponse
Parameters
$verificationId : string

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveUserCode()

Retrieve a user_code that is part of an in-progress Device Authorization Grant.

public retrieveUserCode(string $client_id, string $client_secret, string $user_code) : ClientResponse

This API is useful if you want to build your own login workflow to complete a device grant.

Parameters
$client_id : string

The client id.

$client_secret : string

The client id.

$user_code : string

The end-user verification code.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveUserCodeUsingAPIKey()

Retrieve a user_code that is part of an in-progress Device Authorization Grant.

public retrieveUserCodeUsingAPIKey(string $user_code) : ClientResponse

This API is useful if you want to build your own login workflow to complete a device grant.

This request will require an API key.

Parameters
$user_code : string

The end-user verification code.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveUserComments()

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

public retrieveUserComments(string $userId) : ClientResponse
Parameters
$userId : string

The Id of the user.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveUserConsent()

Retrieve a single User consent by Id.

public retrieveUserConsent(string $userConsentId) : ClientResponse
Parameters
$userConsentId : string

The User consent Id

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveUserConsents()

Retrieves all the consents for a User.

public retrieveUserConsents(string $userId) : ClientResponse
Parameters
$userId : string

The User's Id

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveUserInfoFromAccessToken()

Call the UserInfo endpoint to retrieve User Claims from the access token issued by FusionAuth.

public retrieveUserInfoFromAccessToken(string $encodedJWT) : ClientResponse
Parameters
$encodedJWT : string

The encoded JWT (access token).

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

Retrieve a single Identity Provider user (link).

public retrieveUserLink(string $identityProviderId, string $identityProviderUserId, string $userId) : ClientResponse
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.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveUserLinksByUserId()

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

public retrieveUserLinksByUserId(string $identityProviderId, string $userId) : ClientResponse
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.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveUserLoginReport()

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.

public retrieveUserLoginReport(string $applicationId, string $userId, array<string|int, mixed> $start, array<string|int, mixed> $end) : ClientResponse
Parameters
$applicationId : string

(Optional) The application id.

$userId : string

The userId id.

$start : array<string|int, mixed>

The start instant as UTC milliseconds since Epoch.

$end : array<string|int, mixed>

The end instant as UTC milliseconds since Epoch.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveUserLoginReportByLoginId()

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.

public retrieveUserLoginReportByLoginId(string $applicationId, string $loginId, array<string|int, mixed> $start, array<string|int, mixed> $end) : ClientResponse
Parameters
$applicationId : string

(Optional) The application id.

$loginId : string

The userId id.

$start : array<string|int, mixed>

The start instant as UTC milliseconds since Epoch.

$end : array<string|int, mixed>

The end instant as UTC milliseconds since Epoch.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveUserRecentLogins()

Retrieves the last number of login records for a user.

public retrieveUserRecentLogins(string $userId, int $offset, int $limit) : ClientResponse
Parameters
$userId : string

The Id of the user.

$offset : int

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

$limit : int

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveUserUsingJWT()

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.

public retrieveUserUsingJWT(string $encodedJWT) : ClientResponse
Parameters
$encodedJWT : string

The encoded JWT (access token).

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveWebAuthnCredential()

Retrieves the WebAuthn credential for the given Id.

public retrieveWebAuthnCredential(string $id) : ClientResponse
Parameters
$id : string

The Id of the WebAuthn credential.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveWebAuthnCredentialsForUser()

Retrieves all WebAuthn credentials for the given user.

public retrieveWebAuthnCredentialsForUser(string $userId) : ClientResponse
Parameters
$userId : string

The user's ID.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

retrieveWebhook()

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

public retrieveWebhook([string $webhookId = NULL ]) : ClientResponse
Parameters
$webhookId : string = NULL

(Optional) The Id of the webhook.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

revokeRefreshToken()

Revokes refresh tokens.

public revokeRefreshToken(string $token, string $userId[, string $applicationId = NULL ]) : ClientResponse

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 = NULL

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

revokeRefreshTokenById()

Revokes a single refresh token by the unique Id. The unique Id is not sensitive as it cannot be used to obtain another JWT.

public revokeRefreshTokenById(string $tokenId) : ClientResponse
Parameters
$tokenId : string

The unique Id of the token to delete.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

revokeRefreshTokenByToken()

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.

public revokeRefreshTokenByToken(string $token) : ClientResponse
Parameters
$token : string

The refresh token to delete.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

revokeRefreshTokensByApplicationId()

Revoke all refresh tokens that belong to an application by applicationId.

public revokeRefreshTokensByApplicationId(string $applicationId) : ClientResponse
Parameters
$applicationId : string

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

revokeRefreshTokensByUserId()

Revoke all refresh tokens that belong to a user by user Id.

public revokeRefreshTokensByUserId(string $userId) : ClientResponse
Parameters
$userId : string

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

revokeRefreshTokensByUserIdForApplication()

Revoke all refresh tokens that belong to a user by user Id for a specific application by applicationId.

public revokeRefreshTokensByUserIdForApplication(string $userId, string $applicationId) : ClientResponse
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.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

revokeRefreshTokensWithRequest()

Revokes refresh tokens using the information in the JSON body. The handling for this method is the same as the revokeRefreshToken method and is based on the information you provide in the RefreshDeleteRequest object. See that method for additional information.

public revokeRefreshTokensWithRequest(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

The request information used to revoke the refresh tokens.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

revokeUserConsent()

Revokes a single User consent by Id.

public revokeUserConsent(string $userConsentId) : ClientResponse
Parameters
$userConsentId : string

The User Consent Id

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

searchApplications()

Searches applications with the specified criteria and pagination.

public searchApplications(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

The search criteria and pagination information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

searchAuditLogs()

Searches the audit logs with the specified criteria and pagination.

public searchAuditLogs(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

The search criteria and pagination information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

searchConsents()

Searches consents with the specified criteria and pagination.

public searchConsents(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

The search criteria and pagination information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

searchEmailTemplates()

Searches email templates with the specified criteria and pagination.

public searchEmailTemplates(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

The search criteria and pagination information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

searchEntities()

Searches entities with the specified criteria and pagination.

public searchEntities(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

The search criteria and pagination information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

searchEntitiesByIds()

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

public searchEntitiesByIds(array<string|int, mixed> $ids) : ClientResponse
Parameters
$ids : array<string|int, mixed>

The entity ids to search for.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

searchEntityGrants()

Searches Entity Grants with the specified criteria and pagination.

public searchEntityGrants(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

The search criteria and pagination information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

searchEntityTypes()

Searches the entity types with the specified criteria and pagination.

public searchEntityTypes(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

The search criteria and pagination information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

searchEventLogs()

Searches the event logs with the specified criteria and pagination.

public searchEventLogs(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

The search criteria and pagination information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

searchGroupMembers()

Searches group members with the specified criteria and pagination.

public searchGroupMembers(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

The search criteria and pagination information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

searchGroups()

Searches groups with the specified criteria and pagination.

public searchGroups(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

The search criteria and pagination information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

searchIdentityProviders()

Searches identity providers with the specified criteria and pagination.

public searchIdentityProviders(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

The search criteria and pagination information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

searchIPAccessControlLists()

Searches the IP Access Control Lists with the specified criteria and pagination.

public searchIPAccessControlLists(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

The search criteria and pagination information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

searchKeys()

Searches keys with the specified criteria and pagination.

public searchKeys(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

The search criteria and pagination information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

searchLambdas()

Searches lambdas with the specified criteria and pagination.

public searchLambdas(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

The search criteria and pagination information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

searchLoginRecords()

Searches the login records with the specified criteria and pagination.

public searchLoginRecords(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

The search criteria and pagination information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

searchTenants()

Searches tenants with the specified criteria and pagination.

public searchTenants(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

The search criteria and pagination information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

searchThemes()

Searches themes with the specified criteria and pagination.

public searchThemes(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

The search criteria and pagination information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

searchUserComments()

Searches user comments with the specified criteria and pagination.

public searchUserComments(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

The search criteria and pagination information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

searchUsers()

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

public searchUsers(array<string|int, mixed> $ids) : ClientResponse

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

Parameters
$ids : array<string|int, mixed>

The user ids to search for.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

searchUsersByIds()

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

public searchUsersByIds(array<string|int, mixed> $ids) : ClientResponse
Parameters
$ids : array<string|int, mixed>

The user ids to search for.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

searchUsersByQuery()

Retrieves the users for the given search criteria and pagination.

public searchUsersByQuery(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

searchUsersByQueryString()

Retrieves the users for the given search criteria and pagination.

public searchUsersByQueryString(array<string|int, mixed> $request) : ClientResponse

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

Parameters
$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

searchWebhooks()

Searches webhooks with the specified criteria and pagination.

public searchWebhooks(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

The search criteria and pagination information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

sendEmail()

Send an email using an email template id. You can optionally provide <code>requestData</code> to access key value pairs in the email template.

public sendEmail(string $emailTemplateId, array<string|int, mixed> $request) : ClientResponse
Parameters
$emailTemplateId : string

The Id for the template.

$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

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.

public sendFamilyRequestEmail(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

The request object that contains the parent email.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

sendPasswordlessCode()

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

public sendPasswordlessCode(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

sendTwoFactorCode()

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

public sendTwoFactorCode(array<string|int, mixed> $request) : ClientResponse

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

Parameters
$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

sendTwoFactorCodeForEnableDisable()

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

public sendTwoFactorCodeForEnableDisable(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

sendTwoFactorCodeForLogin()

Send a Two Factor authentication code to allow the completion of Two Factor authentication.

public sendTwoFactorCodeForLogin(string $twoFactorId) : ClientResponse

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.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

sendTwoFactorCodeForLoginUsingMethod()

Send a Two Factor authentication code to allow the completion of Two Factor authentication.

public sendTwoFactorCodeForLoginUsingMethod(string $twoFactorId, array<string|int, mixed> $request) : ClientResponse
Parameters
$twoFactorId : string

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

$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

startIdentityProviderLogin()

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

public startIdentityProviderLogin(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

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.

public startPasswordlessLogin(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

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.

public startTwoFactorLogin(array<string|int, mixed> $request) : ClientResponse

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

Parameters
$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

startWebAuthnLogin()

Start a WebAuthn authentication ceremony by generating a new challenge for the user

public startWebAuthnLogin(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

An object containing data necessary for starting the authentication ceremony

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

startWebAuthnRegistration()

Start a WebAuthn registration ceremony by generating a new challenge for the user

public startWebAuthnRegistration(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

An object containing data necessary for starting the registration ceremony

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

twoFactorLogin()

Complete login using a 2FA challenge

public twoFactorLogin(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

updateAPIKey()

Updates an API key by given id

public updateAPIKey(string $apiKeyId, array<string|int, mixed> $request) : ClientResponse
Parameters
$apiKeyId : string

The Id of the API key to update.

$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

updateApplication()

Updates the application with the given Id.

public updateApplication(string $applicationId, array<string|int, mixed> $request) : ClientResponse
Parameters
$applicationId : string

The Id of the application to update.

$request : array<string|int, mixed>

The request that contains all the new application information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

updateApplicationRole()

Updates the application role with the given Id for the application.

public updateApplicationRole(string $applicationId, string $roleId, array<string|int, mixed> $request) : ClientResponse
Parameters
$applicationId : string

The Id of the application that the role belongs to.

$roleId : string

The Id of the role to update.

$request : array<string|int, mixed>

The request that contains all the new role information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

updateConnector()

Updates the connector with the given Id.

public updateConnector(string $connectorId, array<string|int, mixed> $request) : ClientResponse
Parameters
$connectorId : string

The Id of the connector to update.

$request : array<string|int, mixed>

The request object that contains all the new connector information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

updateConsent()

Updates the consent with the given Id.

public updateConsent(string $consentId, array<string|int, mixed> $request) : ClientResponse
Parameters
$consentId : string

The Id of the consent to update.

$request : array<string|int, mixed>

The request that contains all the new consent information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

updateEmailTemplate()

Updates the email template with the given Id.

public updateEmailTemplate(string $emailTemplateId, array<string|int, mixed> $request) : ClientResponse
Parameters
$emailTemplateId : string

The Id of the email template to update.

$request : array<string|int, mixed>

The request that contains all the new email template information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

updateEntity()

Updates the Entity with the given Id.

public updateEntity(string $entityId, array<string|int, mixed> $request) : ClientResponse
Parameters
$entityId : string

The Id of the Entity to update.

$request : array<string|int, mixed>

The request that contains all the new Entity information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

updateEntityType()

Updates the Entity Type with the given Id.

public updateEntityType(string $entityTypeId, array<string|int, mixed> $request) : ClientResponse
Parameters
$entityTypeId : string

The Id of the Entity Type to update.

$request : array<string|int, mixed>

The request that contains all the new Entity Type information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

updateEntityTypePermission()

Updates the permission with the given Id for the entity type.

public updateEntityTypePermission(string $entityTypeId, string $permissionId, array<string|int, mixed> $request) : ClientResponse
Parameters
$entityTypeId : string

The Id of the entityType that the permission belongs to.

$permissionId : string

The Id of the permission to update.

$request : array<string|int, mixed>

The request that contains all the new permission information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

updateForm()

Updates the form with the given Id.

public updateForm(string $formId, array<string|int, mixed> $request) : ClientResponse
Parameters
$formId : string

The Id of the form to update.

$request : array<string|int, mixed>

The request object that contains all the new form information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

updateFormField()

Updates the form field with the given Id.

public updateFormField(string $fieldId, array<string|int, mixed> $request) : ClientResponse
Parameters
$fieldId : string

The Id of the form field to update.

$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

updateGroup()

Updates the group with the given Id.

public updateGroup(string $groupId, array<string|int, mixed> $request) : ClientResponse
Parameters
$groupId : string

The Id of the group to update.

$request : array<string|int, mixed>

The request that contains all the new group information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

updateGroupMembers()

Creates a member in a group.

public updateGroupMembers(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

updateIdentityProvider()

Updates the identity provider with the given Id.

public updateIdentityProvider(string $identityProviderId, array<string|int, mixed> $request) : ClientResponse
Parameters
$identityProviderId : string

The Id of the identity provider to update.

$request : array<string|int, mixed>

The request object that contains the updated identity provider.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

updateIntegrations()

Updates the available integrations.

public updateIntegrations(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

The request that contains all the new integration information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

updateIPAccessControlList()

Updates the IP Access Control List with the given Id.

public updateIPAccessControlList(string $accessControlListId, array<string|int, mixed> $request) : ClientResponse
Parameters
$accessControlListId : string

The Id of the IP Access Control List to update.

$request : array<string|int, mixed>

The request that contains all the new IP Access Control List information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

updateKey()

Updates the key with the given Id.

public updateKey(string $keyId, array<string|int, mixed> $request) : ClientResponse
Parameters
$keyId : string

The Id of the key to update.

$request : array<string|int, mixed>

The request that contains all the new key information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

updateLambda()

Updates the lambda with the given Id.

public updateLambda(string $lambdaId, array<string|int, mixed> $request) : ClientResponse
Parameters
$lambdaId : string

The Id of the lambda to update.

$request : array<string|int, mixed>

The request that contains all the new lambda information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

updateMessageTemplate()

Updates the message template with the given Id.

public updateMessageTemplate(string $messageTemplateId, array<string|int, mixed> $request) : ClientResponse
Parameters
$messageTemplateId : string

The Id of the message template to update.

$request : array<string|int, mixed>

The request that contains all the new message template information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

updateMessenger()

Updates the messenger with the given Id.

public updateMessenger(string $messengerId, array<string|int, mixed> $request) : ClientResponse
Parameters
$messengerId : string

The Id of the messenger to update.

$request : array<string|int, mixed>

The request object that contains all the new messenger information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

updateOAuthScope()

Updates the OAuth scope with the given Id for the application.

public updateOAuthScope(string $applicationId, string $scopeId, array<string|int, mixed> $request) : ClientResponse
Parameters
$applicationId : string

The Id of the application that the OAuth scope belongs to.

$scopeId : string

The Id of the OAuth scope to update.

$request : array<string|int, mixed>

The request that contains all the new OAuth scope information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

updateRegistration()

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

public updateRegistration(string $userId, array<string|int, mixed> $request) : ClientResponse
Parameters
$userId : string

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

$request : array<string|int, mixed>

The request that contains all the new registration information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

updateSystemConfiguration()

Updates the system configuration.

public updateSystemConfiguration(array<string|int, mixed> $request) : ClientResponse
Parameters
$request : array<string|int, mixed>

The request that contains all the new system configuration information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

updateTenant()

Updates the tenant with the given Id.

public updateTenant(string $tenantId, array<string|int, mixed> $request) : ClientResponse
Parameters
$tenantId : string

The Id of the tenant to update.

$request : array<string|int, mixed>

The request that contains all the new tenant information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

updateTheme()

Updates the theme with the given Id.

public updateTheme(string $themeId, array<string|int, mixed> $request) : ClientResponse
Parameters
$themeId : string

The Id of the theme to update.

$request : array<string|int, mixed>

The request that contains all the new theme information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

updateUser()

Updates the user with the given Id.

public updateUser(string $userId, array<string|int, mixed> $request) : ClientResponse
Parameters
$userId : string

The Id of the user to update.

$request : array<string|int, mixed>

The request that contains all the new user information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

updateUserAction()

Updates the user action with the given Id.

public updateUserAction(string $userActionId, array<string|int, mixed> $request) : ClientResponse
Parameters
$userActionId : string

The Id of the user action to update.

$request : array<string|int, mixed>

The request that contains all the new user action information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

updateUserActionReason()

Updates the user action reason with the given Id.

public updateUserActionReason(string $userActionReasonId, array<string|int, mixed> $request) : ClientResponse
Parameters
$userActionReasonId : string

The Id of the user action reason to update.

$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

updateUserConsent()

Updates a single User consent by Id.

public updateUserConsent(string $userConsentId, array<string|int, mixed> $request) : ClientResponse
Parameters
$userConsentId : string

The User Consent Id

$request : array<string|int, mixed>

The request that contains the user consent information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

updateWebhook()

Updates the webhook with the given Id.

public updateWebhook(string $webhookId, array<string|int, mixed> $request) : ClientResponse
Parameters
$webhookId : string

The Id of the webhook to update.

$request : array<string|int, mixed>

The request that contains all the new webhook information.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

upsertEntityGrant()

Creates or updates an Entity Grant. This is when a User/Entity is granted permissions to an Entity.

public upsertEntityGrant(string $entityId, array<string|int, mixed> $request) : ClientResponse
Parameters
$entityId : string

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

$request : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

validateDevice()

Validates the end-user provided user_code from the user-interaction of the Device Authorization Grant.

public validateDevice(string $user_code, string $client_id) : ClientResponse

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.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

validateJWT()

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

public validateJWT(string $encodedJWT) : ClientResponse

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).

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

vendJWT()

It's a JWT vending machine!

public vendJWT(array<string|int, mixed> $request) : ClientResponse

Issue a new access token (JWT) with the provided claims in the request. This JWT is not scoped to a tenant or user, it is a free form token that will contain what claims you provide.

The iat, exp and jti claims will be added by FusionAuth, all other claims must be provided by the caller.

If a TTL is not provided in the request, the TTL will be retrieved from the default Tenant or the Tenant specified on the request either by way of the X-FusionAuth-TenantId request header, or a tenant scoped API key.

Parameters
$request : array<string|int, mixed>

The request that contains all the claims for this JWT.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

verifyEmail()

Confirms a email verification. The Id given is usually from an email sent to the user.

public verifyEmail(string $verificationId) : ClientResponse

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.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

verifyEmailAddress()

Confirms a user's email address.

public verifyEmailAddress(array<string|int, mixed> $request) : ClientResponse

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 : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

verifyEmailAddressByUserId()

Administratively verify a user's email address. Use this method to bypass email verification for the user.

public verifyEmailAddressByUserId(array<string|int, mixed> $request) : ClientResponse

The request body will contain the userId to be verified. An API key is required when sending the userId in the request body.

Parameters
$request : array<string|int, mixed>

The request that contains the userId to verify.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

verifyRegistration()

Confirms an application registration. The Id given is usually from an email sent to the user.

public verifyRegistration(string $verificationId) : ClientResponse

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.

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

verifyUserRegistration()

Confirms a user's registration.

public verifyUserRegistration(array<string|int, mixed> $request) : ClientResponse

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 : array<string|int, mixed>

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

Tags
throws
Exception
Return values
ClientResponse

The ClientResponse.

withTenantId()

public withTenantId(mixed $tenantId) : mixed
Parameters
$tenantId : mixed

        
On this page

Search results