Contents
On this page
Email Unsubscribe - Plugixa Stream
GET /plugixa-stream/v1/email/unsubscribe
The link at the bottom of every new-episode email. Opened in a browser (GET), it switches the emails off and redirects to the Watch page with unsubscribed=1. A mail provider’s one-click button sends POST, answered in JSON.
Public: the token in the link is the permission. It is signed for one account and can only switch emails off.
Request
GET https://your-site.example/wp-json/plugixa-stream/v1/email/unsubscribe?u=7&t=9b1f0c6e2a7d4f8e3c5b1a0d9e8f7c6b
Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
u |
integer |
Yes | The account’s user id. |
t |
string |
Yes | The token from the email. |
Responses
302 Found, for GET. No body.
Location: https://your-site.example/watch/?unsubscribed=1
200 OK, for POST.
{
"success": true,
"data": {
"unsubscribed": true
}
}
Errors
| Status | Code | When |
|---|---|---|
403 |
plugixa_stream_invalid |
The token does not match, or the account no longer exists. |
400 |
rest_missing_callback_param |
u or t is missing. |
Plus the errors every endpoint can return.
Examples
curl -s -X POST "https://your-site.example/wp-json/plugixa-stream/v1/email/unsubscribe?u=7&t=9b1f0c6e2a7d4f8e3c5b1a0d9e8f7c6b"
Quick Links
Share