GithubHelp home page GithubHelp logo

vemoblast-api-documentation's Introduction

Getting Started

To get started with vemoblas API, follow the steps given below.

  1. Login to your Dashboard
  2. Go to Access Key under Developer menu.
  3. Retrieve API access Keys.

Authorization

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.

Authorization Basic Auth
Username Your secret ID
Password Your client ID
Request Headers
x-api-key Vemoblast API key

Send Message

POST https://api.blast.vemobo.com/v1/chat/messages
Body
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
Success-Response
{
    "status": "success",
    "message": "Successful",
    "data": {
        "id": "2a698cad-fd1f-4351-a94b-f44a3fc51cad",
        "status": "pending"
    }
}

Text Message

Body
{
    "sendTo": "6285743603987",
    "type": "text",
    "body": "Hello world"
}

Media Message

Body
{
    "sendTo": "6285743603987",
    "type": "text",
    "body": "Hello world",
    "media": "https://picsum.photos/seed/picsum/200/300"
}

Messages

Retrieve a list of messages or get specific message

Get Messages

GET https://api.blast.vemobo.com/v1/messages

Get Specific Message

GET https://api.blast.vemobo.com/v1/messages/:id

Webhook

To receive notifications of messages ack, HTTP notifications are configured as explained in the steps given below.

  1. Login to your Console
  2. On the Home page, go to Configurations > Notification.
  3. Enter webhook URL.
  4. Click Save Notification URL.

webhook


NOTE

URL protocol prefix https:// or http:// are required. We highly recommended to use https:// for security purposes.

Verifying Notification Authenticity

To ensure the integrity of the notifications and the content, it is recommended to verify the notification using signatur_key.

Verifying Signature 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.

Sample Response

{
  "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"
}

vemoblast-api-documentation's People

Contributors

hasansas avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.