HideMyNumbers.com API Reference

Introduction

Welcome to the HideMyNumbers API documentation.

Currently, we support 4 APIs: Login, Fetch a Number, Get SMS and Relase a Number.

Here is the recommended workflow for you:


Login

Description: Fetch the token for the corresponding user, given the E-mail address and the password.

Method: POST

URL: http://hidemynumbers.com/api/login

Parameters to post:

Name Description Required?
email email address YES
passwd password of the account YES

Variables in the successful response:

Name Description
res the return value
msg the detail explanation of the response
token the token of the user, which is the credential in all other APIs

Successful response:

{
    "res":0,
    "msg":"Login successfully.",
    "token":"dfbc6f566c5b74e57b3e98b43353b2abb1161caa"
}

Failed response:

{
    "res":-1,
    "msg":"Invalid email or password.",
    "token":null
}

Sample request:

curl --data "[email protected]&passwd=this_is_your_password" http://hidemynumbers.com/api/login

Fetch a Number

Description: acquire a number for a specified App.

Method: POST

URL: http://hidemynumbers.com/api/acquire_number

Parameters to post:

Name Description Required?
token the token retrieved from Login response YES
appid the ID of the App YES
number the exact number you would like to get.
LEAVE IT BLANK IF NO CERTAIN NUMBER IS REQUIRED.
NO

Variables in the successful response:

Name Description
res the return value
msg the detail explanation of the response
fullnumber number with with country code
number number without the country code (this is used in /api/get_sms and /api/release)
country_code the country code of the number

Successful response:

{
    "res":0,
    "msg":"Wating for SMS...",
    "fullnumber":"+8613160983154",
    "number":"13160983154",
    "contry_code":"86"
}

Failed response (1):

{
    "res":-1,
    "msg":"Invalid app."
}

Failed response (2):

{
    "res":-1,
    "msg":"Parameter token or appid is missing."
}

Failed response (3):

{
    "res":-1,
    "msg":"Invalid token."
}

Sample request:

curl --data "token=token_from_login_request&appid=5" http://hidemynumbers.com/api/acquire_number

Get SMS

Description: try to get the SMS from the given number. Please keep calling this API until the res in the response becomes -1 or -2. It is recommended to call this API every 6-10 seconds.

Method: POST

URL: http://hidemynumbers.com/api/get_sms

Parameters to post:

Name Description Required?
token the token retrieved from Login response YES
appid the ID of the App YES
number the number returned in /api/acquire_number response YES

Successful response (1):

{
    "res":1,
    "msg":"Waiting for SMS."
}

Successful response (2):

{
    "res":0,
    "msg":"SMS has arrived.",
    "sms":"WhatsApp code is 123-456"
}

Failed response (1):

{
    "res":-1,
    "msg":"Number not exists."
}

Failed response (2):

{
    "res":-2,
    "msg":"The number has been released without an SMS."
}

Failed response (3):

{
    "res":-3,
    "msg":"Invalid token."
}

Failed response (4):

{
    "res":-3,
    "msg":"Invalid app."
}

Sample request:

curl --data "token=token_from_login_request&appid=5&number=13212345678" http://hidemynumbers.com/api/get_sms

Release a Number

Description: Manually release a number. Please call this API if you do believe that a number would never get an SMS.

Method: POST

URL: http://hidemynumbers.com/api/release

Parameters to post:

Name Description Required?
token the token retrieved from Login response YES
appid the ID of the App YES
number the number returned in /api/acquire_number response YES

Successful response:

{
    "res":0,
    "msg": "The number has been released, your credit will be back in 20s!"
}

Failed response (1):

{
    "res":-1,
    "msg": "Failed to release the number!"
}

Failed response (2):

{
    "res":-2,
    "msg":"Invalid token."
}

Failed response (3):

{
    "res":-2,
    "msg":"Invalid app."
}

Sample request:

curl --data "token=token_from_login_request&appid=5&number=13212345678" http://hidemynumbers.com/api/release
Copyright Hide My Number! © 2015-2016