These docs are for v2.0. Click to read the latest docs for v2.1.

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

NameTypeDescription
publisherToken*stringYour publisher token
customerEmail*stringCustomer's email

Result Parameters

NameTypeDescription
termsobjectTerms and conditions
privacyobjectPesonal data storage policy
broadcaster_termsobjectTerms and conditions set by broadcaster
broadcaster_marketingobjectMarketing 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

CodeDescription
3Invalid publisher token
10User customerEmail does not exist
23User does not exist