- Create an account, if you don’t already have one
- Create an API key for use with Phone Validation
- Make a simple Phone Validation request
Creating an account and API key
Before you can start making any requests, you’ll need to have a valid Loqate account and an API key to use with Phone Validation. If you don’t have these set up already, you can:- Create an account at account.loqate.com
- Create an API key by selecting the Add a service option within your account. See our Creating API Keys page for full details – we recommend creating a generic API key for use with Phone Validation
Making a simple Phone Validation request
With a valid account and API key, you can now start making Phone Validation requests. The endpoint to use is:We don’t support API connections using HTTP – make sure you are using HTTPS for all requests.
Considerations
There are two ways of making a Phone Validation request:- With a country code in international format (i.e. using +44 for a UK phone number or +1 for a US/Canada number)
- Without a country code, instead using the
Country
parameter with the relevant 2- or 3-digit ISO code (i.e. GB/GBR for the UK, or US/USA for the USA)
Example requests
Below we have provided some simple examples of Phone Validation requests. Both will result in the same level of detail in the response. You can copy and paste this example request into a tool such as Postman – just remember to replace the sample API key with your own valid API key.Without the Country parameter
This example uses the international format (i.e. +44) so does not require theCountry
parameter.
With the Country parameter
This example uses a national format, with theCountry
parameter providing the ISO country code (i.e. GBR).
Example response
Both examples above will return the same response:IsValid
field, showing that the inputted phone number is a valid one. It also provides a range of additional information about the phone number in question.
See the Phone Validation API docs for information about specific response fields.