GET /apps/{app_id}/channels
Returns currently occupied channels — i.e. channels with at least one subscriber. Empty channels don’t appear.
Query params
| Param | Description |
|---|---|
filter_by_prefix | Only return channels starting with this prefix (e.g. presence-) |
info | Comma-separated extras — currently only user_count (presence channels only). Without this, only the channel names appear. |
Plus the four auth params: auth_key, auth_timestamp, auth_version, auth_signature.
Example
APP_ID=6855671
KEY=YOUR_KEY
SECRET=YOUR_SECRET
TS=$(date +%s)
# Sign: GET\n/apps/{id}/channels\nfilter_by_prefix=presence-&info=user_count&auth_key=...&auth_timestamp=...&auth_version=1.0
QS="auth_key=$KEY&auth_timestamp=$TS&auth_version=1.0&filter_by_prefix=presence-&info=user_count"
QS_SORTED=$(echo "$QS" | tr '&' '\n' | sort | tr '\n' '&' | sed 's/&$//')
SIG=$(printf 'GET\n/apps/%s/channels\n%s' "$APP_ID" "$QS_SORTED" \
| openssl dgst -sha256 -hmac "$SECRET" -hex | awk '{print $NF}')
curl "https://ws-sa.mawjly.com/apps/$APP_ID/channels?$QS_SORTED&auth_signature=$SIG"Response
{
"channels": {
"presence-room-42": { "user_count": 12 },
"presence-game-7": { "user_count": 4 }
}
}SDK shortcuts
- PHP —
$pusher->getChannels(['filter_by_prefix' => 'presence-']) - Node —
pusher.get({ path: '/channels', params: { filter_by_prefix: 'presence-' } }) - Python —
p.channels_info(prefix_filter='presence-')
Or skip the API entirely: open the Channels tab in the Mawjly dashboard for a live list with type badges.