Data8 Logo

DescriptionEndpoint URLsParametersAdvanced OptionsResultsCredit UsageSample CodeLive Demo
IsValid
Checks if a mobile telephone number is valid and live and returns some information about the subscriber.
Description

Checks a mobile telephone number for validity and returns some information about the subscriber.

If the telephone number is not supplied in full international format, the service will assume it is a UK number by default. This can be overridden by supplying an appropriate value for the DefaultCountryCode option.

This service is not appropriate if you require indication about any number other than a mobile number. In those circumstances, you should consider the use of the InternationalTelephoneValidation service.

Endpoint URLs

To connect to this service you'll need to use one of these endpoints:

Protocol URL
JSON
JSON
https://webservices.data-8.co.uk/MobileValidation/IsValid.json
OPEN API
OPEN API
https://webservices.data-8.co.uk/swagger/MobileValidation/swagger.json
SOAP
SOAP
https://webservices.data-8.co.uk/mobilevalidation.asmx
Parameters
The following parameters can be supplied to this method:
Name Description
username
username

See the available authentication methods. If you are using username & password authentication, specify the username to authenticate as. If you are using API Key authentication and you are not using the JSON, Javascript or ADO APIs, use your API Key here with the prefix apikey-, e.g. apikey-ABCD-1234-EFGH-5678

password
password

If you are using username & password authentication, specify the password to use for authentication. Otherwise leave this blank.

number
number

The telephone number to validate

options
options

An array of options that control further details of how this method operates. See the Advanced Options section below, for more information.

Advanced Options
The following options can be specified as part of the option parameter. Each option is specified as a key/value pair. The list of available names is shown below, along with a description of the allowable values for that name.
Name Description
Common Options
ApplicationName
ApplicationName
Gives the name of the calling application - used to break down usage by application in the usage reports on the dashboard.
Service Specific Options
DefaultCountryCode
DefaultCountryCode

Sets the international dialling code prefix to use by default for any numbers given in local format, e.g. "1" for North America, "49" for Germany etc.

AllowedPrefixes
AllowedPrefixes

A comma-separated list of prefixes in standard international format that the number must start with to be treated as valid. For example, use "+447" to allow only standard UK mobile numbers.

BarredPrefixes
BarredPrefixes

A comma-separated list of prefixes in standard international format that will cause the number to be treated as invalid. For example, use "+90,+447781" to block any Indian numbers or numbers allocated to C&W Guernsey.

Results
This method returns an object containing the following fields:
Name Description
Status
Status

Indicates whether the method call was successful, or if some error occurred. If the Success field is true, the other results described below can be used to get the results of the method. If Success is false, some error occurred in calling the method, such as the authentication failed or the account is out of credits. The details of the error can be obtained from the ErrorMessage field, and any other results should be ignored.

Result
Result

The status of the mobile telephone number query. This can be one of the following values:

  • Success - subscriber available
  • Unavailable - subscriber has a temporary error
  • Invalid - subscriber has a permanent error
  • TimedOut - the query did not return within the time
  • Error - an unknown error occurred

In general, Success means the number will ring/receive a text message, Unavailable indicates the number is valid but the phone is switched off or out of reception, while Invalid means the number is not allocated

CountryISO
CountryISO

The ISO 2-character code of the country the mobile telephone originates from

Organisation
Organisation

The telco the telephone is registered with

NetworkName
NetworkName

The network which the telephone is registered to

NetworkType
NetworkType

The type of network the telephone is registered to

Ported
Ported

Indicates if the telephone has been ported between networks

PortedFromOrganisation
PortedFromOrganisation

If the number has been ported, indicates the organisation the telephone was originally registered with

PortedFromNetwork
PortedFromNetwork

If the number is ported, indicates the network the telephone was originally registered to

LocationISO
LocationISO

The ISO 2-character country code that the mobile is currently located in

Credit Usage

Each request to this method consumes 1 MobileValidation credit.

Sample Code

Request Format

{
  "number": "07562187526",
  "options": {
    "DefaultCountryCode": 44,
    "AllowedPrefixes": null,
    "BarredPrefixes": null
  }
}

Response Format

{
  "Status": {
    "Success": true,
    "CreditsRemaining": 1000
  },
  "Result": "Invalid",
  "CountryISO": "GBR",
  "Organisation": "Telefonica UK Ltd",
  "NetworkName": "O2",
  "NetworkType": null,
  "Ported": "No",
  "PortedFromOrganisation": null,
  "PortedFromNetwork": null,
  "LocationISO": "GBR"
}

Depending on your chosen authentication method you will need to modify this request slightly:

API Key

Post the request to
https://webservices.data-8.co.uk/MobileValidation/IsValid.json?key=your-api-key
and do NOT include the username or password properties in the request JSON document.
Read More

Username and Password

Post the request to
https://webservices.data-8.co.uk/MobileValidation/IsValid.json
and include username and password properties in the request JSON document.
Do not use for client-side requests!
Read More

JWT Token

Obtain a JWT token for your user and post the request to
https://webservices.data-8.co.uk/MobileValidation/IsValid.json
Include the JWT token in the request headers as:
Authorization: Bearer your-jwt-token
Read More
Live Demo
Parameter Value
Parameters
number
number
Common Options
ApplicationName
ApplicationName
Service-Specific Options
DefaultCountryCode
DefaultCountryCode
AllowedPrefixes
AllowedPrefixes
BarredPrefixes
BarredPrefixes
Credits Remaining Today: 5
Try It Now!
An error has occurred. This application may no longer respond until reloaded. Reload 🗙