Pre-Register
How to integrate the Next Identity Journeys with a user invite workflow
Overview
With pre-registration, or invite workflow with Next Identity Journeys the end user profile is created by an administrator from your application, their profile is pre-populated with a limited set of data that is already available (for example, email and name) and then the user will be sent an email or SMS message with a link inviting them to complete their account. The link will take them to an activation screen hosted by the service, and they will be presented with a screen asking for any needed details to finish creating an account (such as password).
This workflow differs from some of the others in that it is started by a direct API call to the service, rather than a redirect. It is meant to be done in a secure server-to-server call.
Integration
Here is an example of how to configure the pre-registration API call . The specific fields needed will depend on your application configuration.
curl --location --request POST 'https://id.eu.nextreason.com/idp/v1/account/pre-register' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic REDACTED'
--data-raw '{
"profile_fields": {
"firstName": "John",
"lastName": "Smith",
"emailAddress": "[email protected]",
"resourceAccessB2b": "true"
},
"client_id": "c8462jyq9dnupu2q4j7sfjzvn6c87j92",
"locale": "en-US",
"auth_type": "email",
"grant_type": "password",
"redirect_uri": "https://localhost.com"
}'
Base Domain
In this example above, the base domain is https://id.eu.nextreason.com/
.
About base domains
Your base domain will be customized for your integration and for enterprise customers will be customized for your site name or brand name. If you don't know your base domain, please contact your Next Reason integration consultant.
Endpoint
The endpoint to use for this is /pre-register
.
Parameters
Below are the required and optional parameters for the /pre-register
endpoint. Your specific parameters may vary depending on your configuration; if you're unclear on the parameters to use, please contact your Next Reason integration consultant.
Required Parameters
The following parameters must be included on every /pre-register
request.
Parameter | Description |
---|---|
Basic authorization header | Required as part of the header. Note that the basic authorization must only be used when it can be passed in a secure server-to-server manner. |
auth_type | This is the method that the user will use for sign in, this will either be email or SMS and is dependent on your client ID configuration. When auth_type is set to email , the rate limiting functionality is implemented, preventing resending verification code requests within a configured time duration. |
client_id | The ID used to authenticate the API call. This client ID is tied to your specific configurations and rules. Contact your integration consultant if you do not know your client ID. |
grant_type | In this case the grant_type value will be password |
profile_fields | This is the object of user data (field name and value pair) that will create your user record. |
redirect_uri | Configures the URL the user is redirected after a successful activation of their account on the hosted screens. Important reminders: - This URL must be included in the safelist configuration. Contact your Next Reason integration consultant to add URLs to this list. - The redirect_uri parameter is only validated against the allowList and is not used in the email link.- The email link will redirect the user to the activation form. Once completed, the user will be redirected back to the configured app_link setting.- The /token call needs to include the app_link URL in order to get the token and not the originating redirect_uri from the first call. |
Optional Parameters
The following parameters are optional.
Parameter | Description |
---|---|
locale | Set the language to be displayed in the hosted screen. Since the locale parameter is optional, if there is not present it will use whatever default value is set for your configuration* See Localization for list of supported locales and the accepted values. |
resend | This parameter resends the invite link for both mobile and email, but will ignore whether the user already exists or not. The default value is false . |
Updated 11 months ago