Contents
On this page
Unsubscribe from Channel - Plugixa Video
DELETE /pvx/v1/channels/{id}/subscribe
Stop following a channel. Unsubscribing from a channel the caller does not follow is not an error.
Any signed-in user (signed in with an Application Password or the login cookie). Signed out, it answers 401. Needs the Channels app on in Plugixa Video -> App manager; with it off, this route answers 404.
Request
DELETE https://your-site.example/wp-json/pvx/v1/channels/692/subscribe
Path parameters
| Name | Type | Description |
|---|---|---|
id |
integer |
The channel’s id |
Responses
200 OK. The caller is not subscribed.
{
"success": true,
"data": {
"subscribed": false,
"subscribers": 312
}
}
| Field | Type | Meaning |
|---|---|---|
data.subscribed |
boolean |
false |
data.subscribers |
integer |
The channel’s subscriber count now |
Errors
| Status | Code | When |
|---|---|---|
401 |
plugixa_video_login_required |
Signed out. |
404 |
plugixa_video_not_found |
No channel with that id, or one that is not published. |
Plus the errors every endpoint can return.
Examples
curl -s -X DELETE "https://your-site.example/wp-json/pvx/v1/channels/692/subscribe" \
-u "$WP_USER:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/pvx/v1/channels/692/subscribe');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_USERPWD => getenv('WP_USER') . ':' . getenv('WP_APP_PASSWORD'),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/pvx/v1/channels/692/subscribe', {
method: 'DELETE',
headers: {
'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
},
});
const { data } = await response.json();
Quick Links
Share