English
English
Appearance
English
English
Appearance
/public/addon/whatsapp/channelLists 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.
Authorization: Basic Base64(AccessKey:SecretKey))| Parameter | Type | Required | Description |
|---|---|---|---|
accountId | string | Yes | The unique ID of a connected WhatsApp account. |
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)"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);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);{
"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"
}
]
}// Account Not Found
{
"code": 404,
"message": "account not found"
}
// Session Not Found
{
"code": 404,
"message": "session not found"
}{
"code": 401,
"message": "unauthorized"
}| Field | Description |
|---|---|
id | ID of the Channel or group. Ends with @newsletter for a Channel, @g.us for a group. |
name | Display name of the Channel or group. |
picture | Picture URL. Empty when the Channel or group has no picture. |
type | channel 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.