Mobile Number Verification Using Telecom Data API

FETCH VERIFIED TELECOM USER DATA USING MOBILE NUMBER

Introduction

Accessing verified user information for non main-stream users and masses have always been a challenge primarily because of their lower technology exposure and is one of the key barriers for their financial inclusion. By simply using the mobile number and the OTP based consent, this API helps to get the user information using verified telecom network data. This data can be used for auto-filling the forms which enhances the end user digital experience by reducing the information that the user needs to fill manually.

Get Free Trial

Create a free account Or “Talk to Us” for price information and other queries.

API Details

Step 1. Generate OTP

TypeURL
Posthttps://api.attestr.com/api/{version}/public/checkx/mobile-telecom/otp

Input and Output Definitions

Request Body Parameters

KeyTypeDescriptionRequiredMin VersionMax Version
numberString10 digit mobile number without leading zeroRequiredv1

Request Header Parameters

TypeNameValue / DescriptionOptionalMin VersionMax Version
StringContent-Typeapplication/jsonRequiredv1
StringAuthorizationBasic {authToken}Requiredv1

If you do not have the authentication token, please refer to Register App to generate one.

Sample Request

Generate OTP Sample
Copy

Response

KeyTypeDescriptionMin VersionMax Version
validBooleanFlag indicating if the OTP was generated successfully by the telecom network providerv1
statusStringStatus code describing the outcome of the operation. Possible values are SUCCESS, CARRIER__UNKNOWN,_ CARRIER__UNSUPPORTED,_ INVALID__TYPE,_ INVALID_NUMBERv1
_idStringUnique request Id to be used for validating the OTP laterv1
numberStringUnique human readable request number.v1
dataObjectThe generate OTP operation first validates the input mobile number for correctness and fetching the telecom provider information. The information so validated is returned in the data field. For more details on output of this field, refer to Phone Validation APIv1
metadataObjectThe telecom specific metadata which is relevant for the next set of APIs. Refer to the Metadata object definition below for details.v1
mnpObjectMobile number portability information if the number was ported to a new supported carrier. Check MNP object below.v1

Metadata Object

KeyTypeDescriptionMin VersionMax Version
otpLengthNumberDifferent telecom providers use different length of the one time password. This returns the OTP length supported for the input mobile number.v1
maxVerifyAttemptsNumberMaximum number of wrong OTP attempts before the request is discarded.v1
maxResendAttemptsNumberMaximum number of resend OTP attempts before the request is discarded.v1
expiryNumberNumber of milliseconds before the generated OTP expiresv1
resendAfterNumberNumber of milliseconds to wait for initiating a resend requestv1

MNP Object

KeyTypeDescriptionMin ValueMax Value
portedBooleanFlag indicating if the mobile number was portedv1
portedProviderStringProvider code as supported by Attestr platform. Possible values are AIRTEL, JIO and VIv1

Sample Output

Sample response for the different cases. Toggle the tabs in the code block below for all possible scenarios.

Success Scenario
Invalid Type
Unsupported Telecom Provider
Unknown telecom provider
Invalid Number
Copy

Error Response

ParameterTypeDescription
codeNumberUnique error codes for different errors. Always available.
messageStringError message describing the error. Always Available.
detailsStringDetail error message. Available only for certain types of errors.

Error Codes

HTTP StatusError CodeError Message
4004001Malformed data or missing required parameter values
4004005Operation could not be performed due to low credits balance
4014016Invalid client authorization
4034031Unauthorized access
4034035Requested service is not provisioned for your account
4034039Client's IP address is not whitelisted
4034035Requested service is not provisioned for your account
4294291Maximum account rate limit exceeded
4294292Maximum API rate limit exceeded
4294293Maximum account daily limit exceeded
4294294Maximum API daily limit exceeded
5005001Request could not be processed
5045041Telecom portal gateway timeout
Sample Error Response
Copy

Step 2. Verify OTP

TypeURL
Posthttps://api.attestr.com/api/{version}/public/checkx/mobile-telecom/verify

Input and Output Definitions

Request Body Parameters

KeyTypeDescriptionRequiredMin VersionMax Version
reqStringUnique request Id generated in the previous stepRequiredv1
otpStringOTP as generated by the telecom providerRequiredv1

Request Header Parameters

TypeNameValue / DescriptionOptionalMin VersionMax Version
StringContent-Typeapplication/jsonRequiredv1
StringAuthorizationBasic {authToken}Requiredv1

Sample Request

Verify OTP
Copy

Response

KeyTypeDescriptionMin VersionMax Version
validBooleanFlag indicating if the OTP was verified successfullyv1
statusStringStatus code indicating the outcome of the operation.v1

Sample Responses

SUCCESS
OTP_LENGTH_MISMATCH
MAX_ATTEMPTS_EXCEEDED
REQUEST_EXPIRED
INVALID_REQUEST
INVALID_OTP
Copy

Error Response

ParameterTypeDescription
codeNumberUnique error codes for different errors. Always available.
messageStringError message describing the error. Always Available.
detailsStringDetail error message. Available only for certain types of errors.

Error Codes

HTTP StatusError CodeError Message
4004001Malformed data or missing required parameter values
4004005Operation could not be performed due to low credits balance
40040015Session expired
4014016Invalid client authorization
4034031Unauthorized access
4034035Requested service is not provisioned for your account
4034039Client's IP address is not whitelisted
4034035Requested service is not provisioned for your account
4294291Maximum account rate limit exceeded
4294292Maximum API rate limit exceeded
4294293Maximum account daily limit exceeded
4294294Maximum API daily limit exceeded
5005001Request could not be processed
5045041Telecom portal gateway timeout

Sample Error Response

Sample Error
Copy

Step 3. Fetch Verified Data

TypeURL
Posthttps://api.attestr.com/api/{version}/public/checkx/mobile-telecom/fetch

Input And Output Definitions

Request Body Parameters

KeyTypeDescriptionMin VersionMax Version
reqStringUnique request Id as generated in step 1.v1

Request Header Parameters

TypeNameValue / DescriptionOptionalMin VersionMax Version
StringContent-Typeapplication/jsonRequiredv1
StringAuthorizationBasic {authToken}Requiredv1

Sample Request

Sample Request
Copy

Response

KeyTypeDescriptionMin VersionMax Version
validBooleanBoolean flag indicating if the data fetch was successfulv1
statusStringStatus code for the operationv1
nameStringFull name of the user as registered with the telecom company. Available for all operators.v1
customerIdStringCustomer Id as registered with the telecom company. Not available for a few cases.v1
dobStringDate of birth if available. Available for few operators only.v1
typeStringService type indicating prepaid, postpaid etc.v1
activatedStringDate of activation if available. Date can be in different formats as supported by the telecom operatorv1
activeBooleanBoolean flag indicating if the provided number is active / has any active plans.v1
addressArray[String]List of addresses as registeredv1
alternateContactArray[String]List of alternate contact numbers if any.v1
emailStringEmail address if availablev1

Sample Response

SUCCESS
INVALID_REQUEST
Copy

Error Response

ParameterTypeDescription
codeNumberUnique error codes for different errors. Always available.
messageStringError message describing the error. Always Available.
detailsStringDetail error message. Available only for certain types of errors.

Error Codes

HTTP StatusError CodeError Message
4004001Malformed data or missing required parameter values
4004005Operation could not be performed due to low credits balance
4014016Invalid client authorization
4034031Unauthorized access
4034035Requested service is not provisioned for your account
4034039Client's IP address is not whitelisted
4034035Requested service is not provisioned for your account
4294291Maximum account rate limit exceeded
4294292Maximum API rate limit exceeded
4294293Maximum account daily limit exceeded
4294294Maximum API daily limit exceeded
5005001Request could not be processed
5045041Telecom portal gateway timeout

Optional Step 4. Re-send OTP

TypeURL
Posthttps://api.attestr.com/api/{version}/public/checkx/mobile-telecom/resend

Input And Output Definitions

Request Body Parameters

KeyTypeDescriptionMin VersionMax Version
reqStringUnique request Id as generated in step 1.v1

Request Header Parameters

TypeNameValue / DescriptionOptionalMin VersionMax Version
StringContent-Typeapplication/jsonRequiredv1
StringAuthorizationBasic {authToken}Requiredv1

Sample Request

Sample Request
Copy

Response

KeyTypeDescriptionMin VersionMax Version
validBooleanBoolean flag indicating if the data fetch was successfulv1
statusStringStatus code for the operationv1

Sample Response

Success
INVAID_REQUEST
MAX_ATTEMPTS_EXCEEDED
REQUEST_WAIT
REQUEST_EXPIRED
Copy

Error Response

ParameterTypeDescription
codeNumberUnique error codes for different errors. Always available.
messageStringError message describing the error. Always Available.
detailsStringDetail error message. Available only for certain types of errors.

Error Codes

HTTP StatusError CodeError Message
4004001Malformed data or missing required parameter values
4004005Operation could not be performed due to low credits balance
40040014Maximum attempts exceeded. Please try after sometime.
4014016Invalid client authorization
4034031Unauthorized access
4034035Requested service is not provisioned for your account
4034039Client's IP address is not whitelisted
4034035Requested service is not provisioned for your account
4294291Maximum account rate limit exceeded
4294292Maximum API rate limit exceeded
4294293Maximum account daily limit exceeded
4294294Maximum API daily limit exceeded
5005001Request could not be processed
5045041Telecom portal gateway timeout

Telecom Network Coverage

This products currently supports Airtel, Vodafone Idea and Jio subscribers only. These three together, roughly account for about 91% of the Indian mobile users population (Data source wikipedia).

BSNL and MTNL are currently not supported and may be added in future.

Get Free Trial

Create a free account Or “Talk to Us” for price information and other queries.

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard