Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
OCA CALL error messages are returned in JSON Format. Each HTTP Status Code will be accompanied by descriptive error text and code. For example, an error might occur.
OCA CALL Gateway provide solution to send SMS. In order to hit the OCA CALL Gateway, we provide Endpoint url, so client can hit and use the API.
OCA Endpoint URL : https://webapigw.ocatelkom.co.id
Before you start
You will need :
OCA API Dashboard account username and password
you have created IVR on blast dashboard
Before you can make a call, you need to make the IVR (Interactive Voice Response) first. In order to make ivr you should log in to dashboard, you can visit https://dashboard.ocatelkom.co.id. Please provide your username and password to log in.
To start making ivr please select IVR menu OCA Blast -> Voice -> IVR and Press Add ivr button to start design your ivr.
We want to show you how to build ivr with dynamic audio, so you can play audio dynamicallya from api trigger call. You can start with choose component Play External Audio, drag and drop the component to the board, as shown in the picture below.
In the component editor, on the right side, you will see the form for specific component, please fill the Audio Url with dynamic variable start with “{{“ symbol and end with “}}” symbol, as shown in the picture below.
Upload audio file is method to store your audio file in OCA’s cloud storage, you can retrieve your audio by url that oca provide after you successfully upload your audio.
HTTP Method : POST
Endpoint URL : https://webapigw.ocatelkom.co.id/call/v2/upload-audio
Form Data (Body)
Property | Type |
---|---|
Response:
Property | Type |
---|---|
OCA CALL provides an authorization method for you to access our resources, which we primarily use Access Token JSON Web Token (JWT). You can get the Access Token by generating it on our API dashboard.
This is the initial display for users who have never generated an access token
Select the channel you want to generate an access token, then click the red button that says "Generate". then access token will be downloaded to your computer in the form of a .txt file.
OCA Provides a collection of numbers that can be used as the caller id number for each call that is made
HTTP Method : GET
Endpoint URL : https://webapigw.ocatelkom.co.id/call/v2/number-collection
Response List (Array)
Property | Type |
---|---|
HTTP Method : GET
Endpoint URL : https://webapigw.ocatelkom.co.id/call/v2/list-recording
Response List (Array)
Property | Type |
---|---|
This error codes is additional information to explain what happened when some errors occured. The following table describe the code which may appear when working with OCA CALL Gateway. If an error is not listed in the table, going back to HTTP status codes above in order to determine the best way to address the issues.
Code | Text | Description |
---|---|---|
If the Variable used is "name", simply fill in the "name" variable in the variable field in the request body with the String data type. If the Variable used is "audio", please get your audio url from the audio upload process above and enter the url in the variable field in the request body
HTTP Method : GET
Endpoint URL : https://webapigw.ocatelkom.co.id/call/v2/call
Request Body:
Property | Type |
---|---|
Response:
Property | Type |
---|---|
HTTP Method : GET
Endpoint URL :
Response:
Property | Type |
---|
Response:
*Sample Result : (Arrray Objects)
HTTP Method : DELETE
Endpoint URL :
Response:
Property | Type |
---|
The OCA Call Gateway attempts to return the appropriate HTTP Status Codes for every request
Code | Text | Description |
---|
After you design your IVR, you can use the ivr to make call to your customer. Remember, you can add dynamic content in your ivr design. In order to use ivr you have to see what ivr that available in your account, the ivr list will show you ivr name, ivr id, and variable (data you must provide when you make a call).
HTTP Method : GET
Endpoint URL :
Response List (Array)
Property | Type |
---|
audio
File (accepted file is mp3)
id
String
filename
String
name
String
url
URL String
phone_number
Array
id
String
filename
String
name
String
url
URL String
5
low-balance
Indicationg that your account has no enough balance left
9
Too Many Request Code
Due to the api rate limit, you have to wait until the currently window wxpires, the default api rate limit is in 25 request per seconds. You can check http headers reaponse in order to know the remaining limit of your request. - X-RateLimit-limit : the rate limit of endpoint - X-RateLmit-Remaining : the number of request left - X-RateLimit-Reset : the remaining window before the rate limit resets
13
Internal Error
Corresponds with HTTP 500. An unknown internal error occured
19
Missing Authorization Header
Corresponds with HTTP 401. It indicates Authorization header is not set properly
33
Data doesn't exist
Corresponds with HTTP 404. The certain data is not found
39
[object]
Corresponds with HTTP 406. There are incorrects or missing parameter in request body, it is like the message_value is not same as the template message
43
Auth token is not supplied
Corresponds with HTTP 401. It indicates Authorization header is not set properly
45
Auth token is not valid
Corresponds with HTTP 401. It indicates Authorization token is not valid
59
Whatsapp Template doesn't exist Code
Corresponds with HTTP 406. Your message template doesn't exist
from_number
String (Phone numbers that get from numbers collection) Required
to_number
String (Destination phone number) Required
ivr_id
String (Get from ivr list) Required
variable
Object (filled with required variable and the value)
success
Boolean
call_id
String
200 | OK | Success |
401 | Unauthorized | Missing or Incorrect authentication details |
404 | Not Found | There is no data available, like user setting etc |
406 | Not Acceptable | Response when there is invalid format in request |
429 | To Many Request | Returned when a request cannot be served due to the system's rate limit having been exhausted for the resource |
500 | Internal Server Error | Something is broken. This is usually a temporary error in server |
| String (success) |
| String (Phone numbers that get from numbers collection) Required |
| String (Destination phone number) Required |
| String (IVR ID ) |
| Object (filled with required variable and the value) |
| ISO Date (call start ringing) |
| ISO Date (call picked up by destination) |
| ISO Date (call ended by destination) |
| Number (total duration from call made until call ended) |
| Number (total talk duration from call picked up by user until call hangup, Billing will be counting by talk_duration) |
| Number (time to answer) |
| String (status from system) |
| String (status of call. submitted, success, failed) |
| ISO Date |
| ISO Date |
| Array Objects* |
| String (it will use when you make a call) |
| String |
| Array (string) (if you add dynamic content when you design your ivr then the variable must be provided in your call request) |
| ISO DATE |
| ISO DATE |