Data validation quick start
Protect account opening and the integrity of user profile data by validating the identity data of your customers, such as their names, addresses, phone numbers and more. This describes how to quickly integrate data validation into your application.
Note
This service is currently preview only, and only available for customers upon request.
Step 1: Create your app
To integrate with Transmit, you'll need to create an application in the Admin Portal (if you don’t have one yet).
- From Applications , click Add application .
- Add the friendly application name to display in the Admin Portal.
-
Add a client display name, and your website URL as a redirect URI (e.g.,
https://your-domain.com
). Although these fields are required for Transmit apps, they won’t be used for the data validation process. - Click Add to create your application. This will automatically generate your client credentials.
Step 2: Get access token
You’ll need an OAuth2 bearer access token to authorize the backend API requests. Using the client ID and client secret of your Transmit application from Step 1, send this request from your backend to generate an access token:
import fetch from 'node-fetch';
async function run() {
const formData = {
client_id: '[CLIENT_ID]', // Client ID found in the app settings
client_secret: '[CLIENT_SECRET]', // Client Secret found in the app settings
grant_type: 'client_credentials',
resource: 'https://dv.identity.security' // Targets Data Validation services
};
const resp = await fetch(
`https://api.transmitsecurity.io/oidc/token`,
{
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams(formData).toString()
}
);
const data = await resp.text();
console.log(data);
}
run();
Step 3: Create use case
Transmit offers built-in integrations to the services of various third-party data validation providers. Create a use case that defines which set of validation services to use when processing a future validation request that specifies this use case.
You can create a use case from the Data Validation page of the Admin Portal, or via API. Instead of starting from scratch, you can use one of our predefined templates for a use case suggestion. For example, you can obtain all templates (or use case suggestions) by sending the following request, which is authorized using the access token generated in Step 2.
curl -i -X GET \
https://api.transmitsecurity.io/xdv/v2/use-case-suggestions \
-H 'Authorization: Bearer [ACCESS_TOKEN]'
The response contains a set of use case templates. Each includes the corresponding services, which data fields are mandatory and optional when requesting data validation, and tags that indicate which type of data is validated, which providers are used, and the overall purpose of the use case. For example:
[
{
"display_name": "Email Risk Use Case",
"description": "Check of email risk and fraud indicators",
"validation_services": [
"EMAILHIPPO_MORE_EDITION_1",
"EMAILHIPPO_MORE_EDITION_2",
"MELISSA_GLOBAL_EMAIL"
],
"mandatory_fields": [
"email"
],
"optional_fields": [
],
"tags": [
"DATA_TYPE.EMAIL",
"PURPOSE.RISK",
"PROVIDER.EMAILHIPPO",
"PROVIDER.MELLISA"
]
},
...
]
After choosing a use case template, the display_name
, description
, and validation_services
can be copied into a POST request to /v2/validation-use-cases
. For example:
curl -i -X POST \
https://api.transmitsecurity.io/xdv/v2/validation-use-cases \
-H 'Authorization: Bearer [ACCESS_TOKEN]' \
-H 'Content-Type: application/json' \
-d '{
"display_name": "Email Risk Use Case",
"description": "Check of email risk and fraud indicators",
"validation_services": [
"EMAILHIPPO_MORE_EDITION_1",
"EMAILHIPPO_MORE_EDITION_2",
"MELISSA_GLOBAL_EMAIL"
]
}'
The response includes the use case ID (id
) of the created use case, along with the data fields that are required and optional when requesting validation. For example:
{
"id": "123abc",
"display_name": "Email Risk Use Case",
"description": "Check of email risk and fraud indicators",
"validation_services": [
"EMAILHIPPO_MORE_EDITION_1",
"EMAILHIPPO_MORE_EDITION_2",
"MELISSA_GLOBAL_EMAIL"
],
"mandatory_fields": [
"email"
],
"optional_fields": [
],
"tags": [
"DATA_TYPE.EMAIL",
"PURPOSE.RISK",
"PROVIDER.EMAILHIPPO",
"PROVIDER.MELLISA"
]
}
Step 4: Initiate data validation
When needed, you can initiate a validation process by sending a POST request to /v2/api/validate-data
with the data you want to validate and the use case ID returned in Step 3. The request is authorized using the access token generated in Step 2. The response will contain the result data returned by each service that was used.
For example, here's a request to validate the user's email address:
curl -i -X POST \
https://api.transmitsecurity.io/xdv/v2/api/validate-data \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"use_case_id": "[USE_CASE_ID]",
"data": {
"email": "user@email.com"
}
}'
Below is an example of a partial validation response. The status
indicates if the respective service successfully processed the validation request (regardless of whether or not the data is valid).
Note
By default, the response only contains mock data for the purpose of simulating a validation response. This is the default for all tenants.
[
{
"validation_service": "EMAILHIPPO_E1",
"correlation_id": "2462db54-c847-4e0b-aee4-07367fbcb093",
"status": "SUCCESS",
"result": {
"raw_response": "{ "result": "Ok","reason": "Success", "role": false,"free": true, "disposable": false,"email": "user@gmail.com","domain": "gmail.com","user": "user","mailServerLocation": "US", "duration": 76 }"
},
"execution_time_millis": "30",
"mock_data": "true" // Indicates response only includes mock data for simulating data validation
},
...
]
Step 5: Handle data validation
Process the data validation response to determine the integrity of the data, and to evaluate the risk. Based on your assessment, you can decide how to proceed. For example, if the data validation occurs in the context of a new account registration and you deem the data to be reliable, then you can securely proceed with your onboarding process.