Upload OBD Audio Library Voice Call API Documentation

Upload OBD Audio Library

Uploading simple OBD Audio to your personal library. This supports only post method. If you are uploading prior to your campaign, you can use GET/POST, both methods while sending Voice Call Campaign request to our API.

Your OBD Audio library will be live for a period of 1 month and later will be deleted from the system.

 

Import Voice Call API postman collection.

Postman Collection

 

Application API URL:

https://www.smsgateway.center/VoiceApi/rest/save

Key Value Description
Login Credentials (Required Parameters)
Authenticate your API request using userId-password or apiKey. You should use either one to authenticate your login.
userId Your Registered Username The registered username parameter to be passed. You can use this if apiKey is not being used.
password Your password The password needs to be urlencoded if there are any special characters used in the password field. You can use this if apiKey is not being used.
apiKey Your unique apiKey apiKey needs to be sent as HTTP header when you are not using userId and password credentials. You can avail this from your user control panel and use instead of userId and password HTTP Request parameter. Please do not disclose this to anyone.
Required Parameters
libraryName string, max 20 chars name Default value is null. If saveAudio=true then you need to name the name of the library within 20 characters. (format = alphanumeric with space)
audioTrack Audio file path .mp3 or .wav audioType=audio required for this parameter. File path to be given of the file. Only .mp3 or .wav file allowed in upload.
Default Parameters (Optional)
format plain|json|xml Value for response format.

System default is plain. If you need responses in JSON or XML then you have to give value as JSON or XML.

Save this Page on your Favorite Social Media

Sample Request Code

POST METHOD

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://www.smsgateway.center/VoiceApi/rest/save",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"userId\"\r\n\r\nYourUsername\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"password\"\r\n\r\nYourPassword\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"audioTrack\"; filename=\"6282741010643239458.wav\"\r\nContent-Type: audio/x-wav\r\n\r\n\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"libraryName\"\r\n\r\nTest 1\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"format\"\r\n\r\njson\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--",
  CURLOPT_HTTPHEADER => array(
    "cache-control: no-cache",
    "content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

POST METHOD

Coming soon!

Response

{
    "status": "success"
    "libraryId": "3509517028302932557",
    "frequency": 11000,
    "length": 12,
    "statusCode": "900",
    "reason": "success",
}
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<voiceUploadResponse>
    <frequency>44100</frequency>
    <length>2</length>
    <libraryId>5784862973990422090</libraryId>
    <reason>success</reason>
    <status>success</status>
    <statusCode>900</statusCode>
</voiceUploadResponse>
status=success | libraryId=826485878102966548 | frequency=11000 | length=12 | errorCode=900 | reason=success