getViewerConsents

This method returns user’s current consents for the broadcaster, with their status and the version that they agreed to.

📘

You can try that method by clicking here

Parameters

Name

Type

Description

publisherToken*

string

Your publisher token

customerEmail*

string

Customer's email

Result Parameters

Name

Type

Description

terms

object

Terms and conditions

privacy

object

Pesonal data storage policy

broadcaster_terms

object

Terms and conditions set by broadcaster

broadcaster_marketing

object

Marketing agreements set by broadcaster

API Request/Response

Request

{
  "method": "getViewerConsents",
  "params": {
     "publisherToken": "bD2TVNJYH1WTAErQVcpjlHk7fmAKZzIK0rKKtp5TdMg0RmIg",
     "customerEmail": "[email protected]"
   },
   "jsonrpc": "2.0",
   "id": 1
}

Response

{
  "result": {
    "terms": {
      "userId": 123456789,
      "name": "terms",
      "state": "accepted",
      "version": "1",
      "date": 1525857061,
      "needsUpdate": false
    },
    "broadcaster_marketing": {
      "userId": 123456789,
      "name": "broadcaster_marketing",
      "state": "accepted",
      "version": "1.7",
      "date": 1525857443,
      "needsUpdate": false
    }
  },
  "id": "1",
  "jsonrpc": "2.0"
}

ErrorCodes

Code

Description

3

Invalid publisher token

10

User customerEmail does not exist

23

User does not exist