Performing HLR (mobile Validation) via REST API
We allow you to perform mobile validation request via the REST API, which is ideal if you want to validate a phone number before submitting a lead into your campaign. A common use case is real‑time number validation on a form to ensure the user has entered a valid number. This guide will show you how.
To begin with, you'll need an Administrator REST API key with "Mobile Validation" permission checked under validation.
More information on creating a key HERE
Next you will make a GET request to the URL below. Make sure you update the URL below wih your account name that replaces [CLIENT DOMAIN], mobile number & API key.
https://[CLIENT DOMAIN].leadbyte.com/restapi/v1.2/validate/mobile?value=[MOBILE NUMBER]&key=[API KEY]
Example responses!
HLR pass (Look for the valid) -
{"input":"07123456789","status":"Valid","response":"NO_ERROR","internal_status":"DELIVERED","message":"Valid mobile number","hlr_data":{"status":"Success","provider_id":"4","campaign_id":0,"supplier_id":0,"sub_supplier_id":0,"destination":"447123456789","stat":"DELIVERED","externalid":"","imsi":"123450000000000","err":0,"orn":"Orange (Everything Everywhere Limited)","onp":"12345","ocn":"United Kingdom","ocp":"44","mccmnc":"12345","isroaming":false,"ron":"","rnp":"","rcn":"","rcp":"","isported":true,"pon":"T-Mobile UK (Everything Everywhere Limited)","pnp":"794","pcn":"United Kingdom","pcp":"44","duration":0.4804790019989,"type":"Rest"},"tag":""}
HLR fail -
{"input":"07123456789","status":"Invalid","response":"EC_UNKNOWN_SUBSCRIBER","internal_status":"REJECTED","message":"HLR rejection","hlr_data":{"status":"Success","provider_id":"4","campaign_id":0,"supplier_id":0,"sub_supplier_id":0,"destination":"44123456789","stat":"REJECTED","externalid":"","imsi":"","err":1,"orn":"Orange (Everything Everywhere Limited)","onp":"12345","ocn":"United Kingdom","ocp":"44","mccmnc":"12345","isroaming":false,"ron":"","rnp":"","rcn":"","rcp":"","isported":false,"pon":"","pnp":"","pcn":"","pcp":"","duration":0.44893789291382,"type":"Rest"},"tag":""}
If you need more info on the HLR responses, please check here.
Comments