HLR HTTP with
Get the status of a landline or mobile phone number with Python
Python : METHODS
SMS
- Send SMS with Python
- Send SMS from template with Python
- Send bulk SMS with Python
- Send Bulk SMS from template with Python
- Get SMS delivery status with Python
TEXT-TO-SPEECH
- Send voice text-to-speech with Python
- Send voice from template with Python
- Send bulk voice with Python
- Send bulk voice from template with Python
- Get voice delivery status with Python
- Send Email with Python
- Send Email from template with Python
- Send bulk Email with Python
- Send Bulk Email from template with Python
- Get email delivery status with Python
SOCIAL NETWORKS
GROUPS
- Create group with Python
- Get group field list with Python
- Add a field to a group with Python
- Delete a field from a group with Python
- Delete a contact from a group
- Assing country to e group with Python
- Get group contact list with Python
- Add contact to a group with Python
- Modify contact of a group with Python
- Delete contact of a group with Python
HLR
COUNTRIES
EVENTS
USER
TEMPLATES
OTP (ONE-TIME PASSWORD)
import urllib2
afilnet_class="hlr"
afilnet_method="checkphonenumbers"
afilnet_user="user"
afilnet_password="password"
afilnet_numbers="100000000,100000001,100000002"
# Create an URL request
sUrl = "https://www.afilnet.com/api/http/?class="+afilnet_class+"&method="+afilnet_method+"&user="+afilnet_user+"&password="+afilnet_password+"&numbers="+afilnet_numbers
result = urllib2.urlopen(sUrl).read()
Returns the status and the details of the indicated phone numbers
Parameter | Description | Compulsory / Optional |
---|---|---|
class=hlr | Class requested: Class to which the request is made | Compulsory |
method=checkphonenumbers | Class method requested: Method of the class to which the request is made | Compulsory |
user | User and e-mail of your Afilnet account | Compulsory |
password | Password of your Afilnet account | Compulsory |
numbers | List of phone numbers including the country code separated by , (commas) | Compulsory |
When you make requests you will receive the following fields:
- status
- result (if status=success), here you will receive the following values:
- credits
- list
- number
- mccmnc
- imsi
- onname
- onprefix
- oncountry
- ported
- portedcountry
- portedname
- portedprefix
- error
- permanent_error
- error (if status=error), here you will receive the error code
The possible error codes are listed below
Code | Description |
---|---|
MISSING_USER | User or email not included |
MISSING_PASSWORD | Password not included |
MISSING_CLASS | Class not included |
MISSING_METHOD | Method not included |
MISSING_COMPULSORY_PARAM | Compulsory parameter not included |
INCORRECT_USER_PASSWORD | Incorrect user or password |
INCORRECT_CLASS | Incorrect class |
INCORRECT_METHOD | Incorrect method |
Parameters:
- class: hlr
- method: checkphonenumbers
- user: user
- password: password
- numbers: 100000000,100000001,100000002
Request:
https://www.afilnet.com/api/http/?class=hlr&method=checkphonenumbers&user=user&password=password&numbers=100000000,100000001,100000002