Channels module
This module provides access to sharing channels such as newsletters or push notifications.
URL Format
You can use GET or POST variables in your requests.
baseUrl/channels.php?action=ACTION¶ms...
When the visitor token is required, add
&token=TOKEN_HERE
List of actions
The parameter "action" determines the action you would like to match. See below list.
register
Register a mobile device's push token to receive notifications from a specific channel.
Parameters:
- token
- channelId: int
- pushSignature: string (the token from APN or Firebase or browser)
- clientOS: string (Android, iOS, Web)
- clientOSVersion: string (example: iOS 15.1)
- clientVersion: string (the version of your application)
- proxied_ip: string (optional, only works when you use an authenticated API key)
- userAgent: string (the user agent of your device)
- deviceId: string (your unique device ID)
Response: the "error" key will be false in case of no error.
unregister
Unregister a device from a channel. Use the same parameters are the register function.
channels_list
List of channels that the user can subscribe to, filtered by type.
Parameters:
- type: string (value of: push, email, newsletter)
newsletter_list
@TODO List all publicly available newsletter channels that a user can subscribe to.
newsletter_subscriptions_list
@TODO List all publicly available newsletter channels that a user can subscribe to.