To get started with vemoblas API, follow the steps given below.
- Login to your Dashboard
- Go to Access Key under Developer menu.
- Retrieve API access Keys.
To ensure secure client server communication, every API call should be authorized. Out of the various Authorization methods available, Vemoblat uses BASIC AUTH. The format for BASIC AUTH is Username:Password. Using BASIC AUTH, API key can be passed as either Username or Password. For Vemoblat, API key is passed as the Username, paired with an empty value for Password. It is then encoded into Base64 format and used as the authorization header.
Username | Your secret ID |
Password | Your client ID |
x-api-key | Vemoblast API key |
POST https://api.blast.vemobo.com/v1/chat/messages
sendTo | Whatsapp number (international number) |
type | Type of message (text, media, contacts, buttons, list) |
body | Content of message |
media | Url media |
title | Title of message |
footer | Footer of message |
contacts | Array of contacts |
buttons | Array of buttons |
listSections | Array of listSections |
listButtonText | Text for list button |
chatGroupId | Optional for grouping message |
refId | Optional for reference message |
refUser | Optional to track your user message |
{
"status": "success",
"message": "Successful",
"data": {
"id": "2a698cad-fd1f-4351-a94b-f44a3fc51cad",
"status": "pending"
}
}
{
"sendTo": "6285743603987",
"type": "text",
"body": "Hello world"
}
{
"sendTo": "6285743603987",
"type": "text",
"body": "Hello world",
"media": "https://picsum.photos/seed/picsum/200/300"
}
Retrieve a list of messages or get specific message
GET https://api.blast.vemobo.com/v1/messages
GET https://api.blast.vemobo.com/v1/messages/:id
To receive notifications of messages ack, HTTP notifications are configured as explained in the steps given below.
- Login to your Console
- On the Home page, go to Configurations > Notification.
- Enter webhook URL.
- Click Save Notification URL.
URL protocol prefix
https://
orhttp://
are required. We highly recommended to usehttps://
for security purposes.
To ensure the integrity of the notifications and the content, it is recommended to verify the notification using signatur_key.
In the notification response body, Vemoblast provides signature_key which is generated by appending messageId and ServerKey into a string. ServerKey is confidential information known only to Vemoblast and you. Thus, you can verify the signature_key to ensure that the notification is signed by Vemoblast.
The logic to generate or calculate signature_key is explained below:
SHA512(messageId+ServerKey)
It basically means append the value of messageId and ServerKey into one string, then use it as input to SHA512 hash function. Then the output should match with signature_key from notification.
{
"id": "2f46c8a1-acaf-4a77-95c1-36542367048e",
"message_id": "3EB06B8767A952E20C4086",
"ack": "ACK_DEVICE",
"from": "6289627784235",
"to": "6285743603758",
"ref_id": "",
"chat_group_id": "",
"ref_user": "",
"signature_key": "270ea41cb5c19fb535968d560b027efab5b6d48d7a0c38f0aa2b7e5a6afdd3c98b3a40de5b4a27dadb75100e8547dc7ecc22a8fae4f88e11ddc1e28156b43752"
}