Skip to content

Get WhatsApp Channel ​

GET /public/addon/whatsapp/channel

Lists the WhatsApp Channels and groups a connected WhatsApp account can post to. Pass the chosen item as additionalInfo.channel in Create Schedule to publish there instead of to the number's Status.

Endpoint Details ​

  • Authentication: Basic Auth (Authorization: Basic Base64(AccessKey:SecretKey))
  • Access Tier: Premium+

Parameters ​

ParameterTypeRequiredDescription
accountIdstringYesThe unique ID of a connected WhatsApp account.

Example Request ​

bash
curl -X GET "https://api.repliz.com/public/addon/whatsapp/channel?accountId=680affa5ce12f2f72916f67e" \
  -H "Authorization: Basic $(echo -n 'YOUR_ACCESS_KEY:YOUR_SECRET_KEY' | base64)"
javascript
import axios from 'axios';

const response = await axios.get('https://api.repliz.com/public/addon/whatsapp/channel', {
  params: {
    accountId: '680affa5ce12f2f72916f67e'
  },
  auth: {
    username: 'YOUR_ACCESS_KEY',
    password: 'YOUR_SECRET_KEY'
  }
});

console.log(response.data);
javascript
const credentials = btoa('YOUR_ACCESS_KEY:YOUR_SECRET_KEY');

const response = await fetch('https://api.repliz.com/public/addon/whatsapp/channel?accountId=680affa5ce12f2f72916f67e', {
  headers: {
    'Authorization': `Basic ${credentials}`
  }
});

const data = await response.json();
console.log(data);

Response ​

json
{
  "docs": [
    {
      "id": "120363413774168194@newsletter",
      "name": "Boom",
      "picture": "https://pps.whatsapp.net/m1/v/t24/An-6sQyuS8Q9UAjgMTbC8PQ5J3fWqldErtluDIBugLBhJk7llbTd2XIQT...",
      "type": "channel"
    },
    {
      "id": "120363431415481328@g.us",
      "name": "Test",
      "picture": "https://pps.whatsapp.net/v/t61.24694-24/534425366_1602052011300539_4061624974523006608_n.jpg?...",
      "type": "group"
    }
  ]
}
json
// Account Not Found
{
  "code": 404,
  "message": "account not found"
}

// Session Not Found
{
  "code": 404,
  "message": "session not found"
}
json
{
  "code": 401,
  "message": "unauthorized"
}
FieldDescription
idID of the Channel or group. Ends with @newsletter for a Channel, @g.us for a group.
nameDisplay name of the Channel or group.
picturePicture URL. Empty when the Channel or group has no picture.
typechannel or group.

The list has the Channels the number owns (Channels it only follows are left out) followed by every group it has joined. The number's own Status is not in the list: to post there, leave additionalInfo.channel out of the schedule.

A session not found error means the account is not a WhatsApp account, or its WhatsApp login has ended, for example because the device was logged out from the phone. Reconnect the account and try again.