1. Home
  2. Gateway
  3. HTTP Api
  4. Caller IDs

Caller IDs

The sender ID validation API allows you to automatically validate caller IDs for the Voice API. After calling this API you will get a code back if successful. At the same time, the phone number will receive a call from us. The returned code must then be entered via DTMF using the telephone’s keypad.

Send your request to the following URL:

https://gateway.sms77.io/api/validate_for_voice

In addition to the data for authentication the following parameters are required:

Required Parameters

Parameter Description Possible values
number The phone number to be validated. The format is almost arbitrary – our gateway automatically formats the number correctly. 491632429751
00491632429751
0163-2429751

Optional parameters

Parameter Description Possible values
callback Callback URL that is to be called as soon as the validation has been performed successfully. https://your-domain.com/validate.php?...

Return

In case of success and if the phone number has not yet been validated for your account, you will receive a JSON object with the code back.

{
"success": true,
"code": "699350",
"error": null
}

If an error has occurred, you get a JSON object like the one below:

Example Phone number invalid

{
    "id": null,
    "sender": "4917600000...",
    "formatted_output": null,
    "success": false,
    "error": "Number is invalid",
    "voice": false
}

Example Phone number already validated

{
    "id": 12345,
    "sender": "4917600000...",
    "formatted_output": "+49 176 0000...",
    "success": true,
    "error": "The caller ID has already been saved.",
    "voice": true
}

Callback

The URL specified by parameter callback is called as soon as the validation has been successfully completed. The following parameters will be added to your URL via HTTP GET:

Parameter Description Example
id Internal ID of the caller ID. 12345
sender International phone number 491632429751
formatted_output Phone number formatted +49 163 2429751
success Query successful 1 – on successful request or if already validated

0 – in case of error

error Error message Empty if successful, otherwise error message
voice Internationally formatted call number 1 – Can be set as Caller ID

0 – Can be set not as Caller ID

 

Was this article helpful to you? Yes No
Menu