1. Home
  2. Docs
  3. Gateway
  4. HTTP Api
  5. 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

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

Optional parameters

ParameterDescriptionPossible values
callbackCallback 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:

ParameterDescriptionExample
idInternal ID of the caller ID.12345
senderInternational phone number491632429751
formatted_outputPhone number formatted+49 163 2429751
successQuery successful1 – on successful request or if already validated

0 – in case of error

errorError messageEmpty if successful, otherwise error message
voiceInternationally formatted call number1 – Can be set as Caller ID

0 – Can be set not as Caller ID

 

Was this article helpful to you? Yes No
Menu