Activating Users
Activating users who receive tickets without having an Ingresse account.
Ingresse platform is able to handle tickets emission to emails that are not registered in an account. When it happens, we send an e-mail with a button indicating to the person to complete the registration in order to move on. There are 2 flows to handle.
Checking Wether The Token Is Still Valid
In both flows we recommend you to use the hash validation API to prevent the customer to fill the form and only when submitting be aware that the token has expired.
1. Creating Account With Token
If you are re-creating all the authentication pages for your company, we can add the web URL to redirect the user from Ingresse e-mail to a webpage into your website that is for user creation with the hash to be used for registration. The token
will be sent as a query string like in the example below:
https://www.yoursite.com/creating-user-url?token=example4g3f54ug6fy45f64fy45h3jgf56h4f&[email protected]
The e-mail from the customer who requested the account creation will be sent as well, so you can lock this field in the registration form.
2. Creating Account Without Token
Sometimes the customer will not attempt to create the account from the e-mail, and the webpage will not have the token. In this case, after calling Create User API, you will receive the same answer, but the user type will be incomplete
.
{
"responseData": {
"status": true,
"data": {
"email": "[email protected]",
"document": null,
"name": "John",
"lastName": "Doe",
"ddi": 55,
"phone": "11999998888",
"verified": false,
"type": "incomplete",
"token": "1234-secrettoken",
"userId": 1234,
"authToken": "jwt-token"
}
},
"responseDetails": "OK",
"responseError": null,
"responseStatus": 200
}
In those cases, an e-mail will be sent to customers in order to request them to validate the account and register a password. This webpage needs only to request the password, as the example below.
Validating An Already Registered Account
After the first registration, with incomplete user, we need to validate the account and email. In order to do that we send a new email that will only require the password from the customer.
This webpage, in general, is a different page, with only the password field. For that page you can use Activate User API.
Updated over 6 years ago