WhatsApp API-Key

This documentation explains how to open the door to the WhatsApp API-Key.

Introduction

You will need the API-Key for using the WhatsApp API.

Our Hub API lets you request and receive API-Keys for each of your WhatsApp Numbers.

API Reference

Authorization information to access the Hub API can be found in Authorization

Create WhatsApp API-Key

Request Schema

Method, Endpoint & Header
Body
Method, Endpoint & Header
POST /v1/apps/<app_id>/api_keys
Authorization: Bearer YOURTOKEN
Content-Type: application/json
Body

Response Codes

200
40X
500
200
{
"id": int,
"app_id": string,
"api_key": string,
"address": URL
}
40X
{
"meta": {
"success": false,
"http_code": 40X,
"developer_message": string
}
}
500
{
"meta": {
"success": false,
"http_code": 500,
"developer_message": string
}
}

Example

Request
Response
Request
POST /v1/apps/307/api_keys
Authorization: Bearer YOURTOKEN
Content-Type: application/json
Response
{
"id": "11",
"app_id": "307",
"api_key": "123ABCX",
"address": "https://waba.messagepipe.io"
}

The address variable is the URL you need to use as Base Path for the WhatsApp API.

Receive API-Key for specific WhatsApp Number

Request Schema

Method, Endpoint & Header
Body
Method, Endpoint & Header
GET /v1/apps/<app_id>/api_keys/<api_key_id>
Authorization: Bearer YOURTOKEN
Content-Type: application/json
Body

Response Codes

200
40X
500
200
{
"id": int,
"app_id": string,
"api_key": string,
"address": URL
}
40X
{
"meta": {
"success": false,
"http_code": 40X,
"developer_message": string
}
}
500
{
"meta": {
"success": false,
"http_code": 500,
"developer_message": string
}
}

Example

Request
Response
Request
GET /v1/apps/307/api_keys/<api_key_id>
Authorization: Bearer YOURTOKEN
Content-Type: application/json
Response
{
"id": "10",
"app_id": "301",
"api_key": "123xyz",
"address": "https://waba.messagepipe.io"
}

Receive API-Key for all WhatsApp Numbers

Request Schema

Method, Endpoint & Header
Body
Method, Endpoint & Header
GET /v1/apps/<app_id>/api_keys
Authorization: Bearer YOURTOKEN
Content-Type: application/json
Body

Response Codes

200
40X
500
200
{
"api_keys": [
{
"id": int,
"app_id": string,
"api_key": string,
"address": URL
},
{
"id": int,
"app_id": string,
"api_key": string,
"address": URL
}
]
}
40X
{
"meta": {
"success": false,
"http_code": 40X,
"developer_message": string
}
}
500
{
"meta": {
"success": false,
"http_code": 500,
"developer_message": string
}
}

Example

Request
Response
Request
GET /v1/apps/307/api_keys
Authorization: Bearer YOURTOKEN
Content-Type: application/json
Response
{
"api_keys": [
{
"id": "10",
"app_id": "100",
"api_key": "some_api_key",
"address": "https://waba.messagepipe.io"
},
{
"id": "11",
"app_id": "111",
"api_key": "second_api_key",
"address": "https://waba.messagepipe.io"
}
]
}