The Digital Identity API delivers a secure and robust solution for seamless user registration and verification.
Key Features
Ensures the authenticity of user-provided information.
Verifies email addresses and phone numbers.
With this API, you can manage user identities while ensuring a high level of security and trust.
💼 Transaction Flow
Check existence of the user
Verify if the email and phone already exist in the system.
Phone Verification
Request OTP: Send an OTP to the provided phone number.
Verify OTP: Validate the OTP entered by the user.
Use the phoneNumberOtpRequestId returned from this step in subsequent requests.
Email Verification
Request OTP: Send an OTP to the provided email address.
Verify OTP: Validate the OTP entered by the user.
Use the EmailNumberOtpRequestId returned from this step in subsequent requests.
Create User
Create the user with the verified phone number email.
Ensure the phoneNumberOtpRequestId and EmailNumberOtpRequestId from the previous steps is used to maintain the transaction flow.
⚠️ Note: Always use the phoneNumberOtpRequestId andEmailNumberOtpRequestId returned from each step in subsequent requests.
Create a new user
The process can be summarized in the flow chart below.
Step1 - Check existence
One call to confirm whether the phone number or the email address has been used before for the same tenant.
Note: You can enter one of the two parameters in request body, but sending none of them should lead to an error.
post
Body
emailstring · email · nullableOptional
phoneNumberstring · nullableOptional
Responses
200
Success
post
/api/DigitalIdentity/CheckExistenceOfEmailOrPhone
200
Success
Step2 - Verify phone number
Two step process to verify phone number ownership
Call request OTP: in this step we only need the phoneNumber parameter to request the OTP verification.
In response to this API call, the response body has a "phoneNumberOtpRequestId" parameter, this should be used in the next step.
Verify the OTP: calling the same endpoint with two additional parameters in the request body.
phoneNumberOtpRequestId: UUID received from the previous API call.
phoneNumberOtp: the six-digit OTP received via SMS by the registered phone number.
Just like the phone number, we need to validate the Email address of the end-user. The process is typically the same, although it is not mandatory on registration.
If you want to skip this step, you can go directly to Step 4 directly and add a skipEmail param to the request body with value "true".
Keep in mind, you need to register and validate the Email address before you proceed with business request creation.
Two step process for email verification
Request OTP for email
Verify the OTP
post
Body
emailstringRequired
emailOtpstring · nullableOptional
emailOtpRequestIdstring · nullableOptional
transactionIdstring · uuidOptional
returnUrlstring · nullableOptional
Responses
200
Success
post
/api/DigitalIdentity/Register/StepVerifyEmail
200
Success
Step 4 - Create user
Finalize user registration after successful phone and email (If provided) verification
If the user skipped adding an email during the account creation process but later needs to submit a business request, they must first add and verify their email. This endpoint is used to verify the user's email by validating the OTP sent to their email address.
The first step is to send an OTP to the email address. The request body should contain "email".
The second step is to verify the OTP. The request body should contain "email", "emailOtp" and "emailOtpRequestId".
Phone and email verification involve two API calls each:
Request OTP.
Verify OTP.
OTPs have an expiration time. Check the OtpExpireInSeconds field in responses.
Resend OTP if expired by making a new OTP request call.
⚠️ Error Handling
All endpoints return a standardized error object with an error_code and error_message in case of failures. Always check these fields for proper error handling in your application.
🌍 Geolocation and IMEI
The CreateUser endpoint requires geolocation data. Ensure you have user consent before collecting and sending this information.
The IMEI is used for device identification. Make sure you comply with local regulations regarding the collection and use of IMEI numbers.