Quickstart
Signup
In this Quickstart, you’ll learn how to sign up and receive your account credentials to start using the VoIPBin API.
Sign up to VoIPBin
To begin, send a sign-up request email to:
pchero21@gmail.com
Include the following details in your email:
Your name or organization name.
Contact information.
A brief description of how you plan to use VoIPBin.
Note: VoIPBin is currently a personal project. Automatic account creation is not available at this time, so all requests are handled manually. Please allow some time for your request to be processed.
What Happens Next
Once your request is processed, you will receive an email with the following account credentials:
ID: Your unique account identifier.
Password: A secure password to access your account.
Keep these credentials secure, as they are required to log in and access VoIPBin services.
After receiving your account credentials, you can start exploring VoIPBin features. Begin with the tutorial guides to understand how to configure and use the API effectively.
Authentication
In this Quickstart, you’ll learn how to authenticate your requests using either a Token or an Accesskey.
To interact with the VoIPBin API, you need to authenticate your requests using either a Token or an Accesskey. Both options serve the same purpose — validating your request and authenticating your identity.
Generate Token
To generate a JWT token, send a request with your username and password, as shown in the example below:
$ curl --request POST 'https://api.voipbin.net/auth/login' \
--header 'Content-Type: application/json' \
--data-raw '{
"username": "your-voipbin-username",
"password": "your-voipbin-password"
}'
{
"username": "your-voipbin-username",
"token": "eyJhbsdiOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21lciI6IntcImlkXCI6XCI1ZTRhMDY4MC04MDRlLTExZWMtODQ3Ny0yZmVhNTk2OGQ4NWJcIixcInVzZXJuYW1lXCI6XCJhZG1pblwiLFwibmFtZVwiOlwiYWRtaW5cIixcImRldGFpbFwiOlwiYWRtaW4gYWNjb3VudFwiLFwid2ViaG9va19tZXRob2RcIjpcIlBPU1TcIixcIndlYmhvb2tfdXJpXCI6XCJodHRwczovL2VubG1ieXVqamowbWcueC5waXBlZHJlYW0ubmV0XCIsXCJsaW5lX3NlY3JldFwiOlwiYmE1ZjA1NzVkODI2ZDViNGEwNTJhNDMxNDVlZjEzOTFcIixcImxpbmVfdG9rZW5cIjpcInRzZklpREIvMmNHSTVzSFJNSW9wN1MzU1M0S3NiRWxKL3VrUUtzNkxwSFkxWG9GM2hxdi9sF0CtLg0SY9U0"
}
The token will be valid for 7 days.
Generate Accesskey
You can generate your access key directly from the VoIPBin admin page, as shown in the image below.
To use the API, you will need an access key, so generating it from the admin page is required. When creating the access key, you can specify an expire parameter to define how long the access key will remain valid.
For more details on how to use the Accesskey, refer to the full tutorial here.
Using Your Token or Accesskey
You can use either a Token or an Accesskey for authentication in API requests. Both serve the same purpose, so choose the one that best fits your workflow.
For Token: Include it in the request header or body when making API requests.
For Accesskey: Include the access key token in the accesskey query parameter when making API requests.
Example to retrieve a list of access keys
Using Accesskey:
$ curl -k --location --request GET 'https://api.voipbin.net/v1.0/accesskeys?accesskey=AuTKq6F5ABCD3xw9'
Using Token (in the request header):
$ curl -k --location --request GET 'https://api.voipbin.net/v1.0/accesskeys' \
--header 'Authorization: Bearer <your-token>'
Using Token (in the request parameter):
$ curl -k --location --request GET 'https://api.voipbin.net/v1.0/accesskeys?token=<your token>'
Call
In this Quickstart, you’ll learn how to make an outbound voice call.
Make your first voice call with manual actions
Use the Voipbin API to initiate an outbound telephone call from your Voipbin account.
$ curl --location --request POST 'https://api.voipbin.net/v1.0/calls?token=your-voipbin-token' \
--header 'Content-Type: application/json' \
--data-raw '{
"source": {
"type": "tel",
"target": "+82XXXXXXXX"
},
"destinations": [
{
"type": "tel",
"target": "+82XXXXXXXX"
}
],
"actions": [
{
"type": "talk",
"option": {
"text": "Hello. This is voipbin test. The voipbin provides ready to go CPaaS service. Thank you, bye.",
"gender": "female",
"language": "en-US"
}
}
]
}'
[
{
"id": "e2a65df2-4e50-4e37-8628-df07b3cec579",
"customer_id": "5e4a0680-804e-11ec-8477-2fea5968d85b",
"flow_id": "6cbaa351-b112-452d-84c2-01488671013d",
"type": "flow",
"master_call_id": "00000000-0000-0000-0000-000000000000",
"chained_call_ids": [],
"recording_id": "00000000-0000-0000-0000-000000000000",
"recording_ids": [],
"source": {
"type": "tel",
"target": "+821028286521",
"target_name": "",
"name": "",
"detail": ""
},
"destination": {
"type": "tel",
"target": "+821021656521",
"target_name": "",
"name": "",
"detail": ""
},
"status": "dialing",
"action": {
"id": "00000000-0000-0000-0000-000000000001",
"next_id": "00000000-0000-0000-0000-000000000000",
"type": ""
},
"direction": "outgoing",
"hangup_by": "",
"hangup_reason": "",
"tm_progressing": "9999-01-01 00:00:00.000000",
"tm_ringing": "9999-01-01 00:00:00.000000",
"tm_hangup": "9999-01-01 00:00:00.000000",
"tm_create": "2023-03-28 12:00:05.248732",
"tm_update": "9999-01-01 00:00:00.000000",
"tm_delete": "9999-01-01 00:00:00.000000"
}
]
Make your first voice call with existed flow
Use the Voipbin API to initiate an outbound telephone call with existed flow.
$ curl --location --request POST 'https://api.voipbin.net/v1.0/calls?token=your-voipbin-token' \
--header 'Content-Type: application/json' \
--data-raw '{
"source": {
"type": "tel",
"target": "<your source number>"
},
"destinations": [
{
"type": "tel",
"target": "<your destination number>"
}
],
"flow_id": "ed95a3c4-22d4-11ee-add7-8742a741581e",
}'
[
{
"id": "e2a65df2-4e50-4e37-8628-df07b3cec579",
"customer_id": "5e4a0680-804e-11ec-8477-2fea5968d85b",
"flow_id": "ed95a3c4-22d4-11ee-add7-8742a741581e",
"type": "flow",
"master_call_id": "00000000-0000-0000-0000-000000000000",
"chained_call_ids": [],
"recording_id": "00000000-0000-0000-0000-000000000000",
"recording_ids": [],
"source": {
"type": "tel",
"target": "+821028286521",
"target_name": "",
"name": "",
"detail": ""
},
"destination": {
"type": "tel",
"target": "+821021656521",
"target_name": "",
"name": "",
"detail": ""
},
"status": "dialing",
"action": {
"id": "00000000-0000-0000-0000-000000000001",
"next_id": "00000000-0000-0000-0000-000000000000",
"type": ""
},
"direction": "outgoing",
"hangup_by": "",
"hangup_reason": "",
"tm_progressing": "9999-01-01 00:00:00.000000",
"tm_ringing": "9999-01-01 00:00:00.000000",
"tm_hangup": "9999-01-01 00:00:00.000000",
"tm_create": "2023-03-28 12:00:05.248732",
"tm_update": "9999-01-01 00:00:00.000000",
"tm_delete": "9999-01-01 00:00:00.000000"
}
]
Queue
In this Quickstart, you’ll learn how to set the queue.
Create your first queue
$ curl --location --request POST 'https://api.voipbin.net/v1.0/queues?token=your-voipbin-token' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "test queue",
"detail": "test queue detail",
"routing_method": "random",
"tag_ids": ["d7450dda-21e0-4611-b09a-8d771c50a5e6"],
"wait_actions": [
{
"type":"talk",
"option": {
"text": "Hello. This is test queue. Please wait.",
"gender": "female",
"language": "en-US"
}
},
{
"type": "sleep",
"option": {
"duration": 1000
}
}
],
"timeout_wait": 100000,
"timeout_service": 10000000
}'
{
"id": "99bf739a-932f-433c-b1bf-103d33d7e9bb",
"customer_id": "5e4a0680-804e-11ec-8477-2fea5968d85b",
"name": "test queue",
"detail": "test queue detail",
"routing_method": "random",
"tag_ids": [
"d7450dda-21e0-4611-b09a-8d771c50a5e6"
],
"wait_actions": [
{
"id": "00000000-0000-0000-0000-000000000000",
"next_id": "00000000-0000-0000-0000-000000000000",
"type": "talk",
"option": {
"text": "Hello. This is test queue. Please wait.",
"gender": "female",
"language": "en-US"
}
},
{
"id": "00000000-0000-0000-0000-000000000000",
"next_id": "00000000-0000-0000-0000-000000000000",
"type": "sleep",
"option": {
"duration": 1000
}
}
],
"wait_timeout": 100000,
"service_timeout": 10000000,
"wait_queuecall_ids": [
"65b3f8c3-ce8e-4a5d-ae13-598aa2889377"
],
"service_queuecall_ids": [],
"total_incoming_count": 228,
"total_serviced_count": 169,
"total_abandoned_count": 99,
"tm_create": "2021-12-24 06:33:10.556226",
"tm_update": "2023-03-07 12:39:54.664143",
"tm_delete": "9999-01-01 00:00:00.000000"
}