submitConsent

❗️

Deprecated

This JSON-RPC method is deprecated.

Set user’s consent state. The state will be saved in the database with current date and the information about last consent version they agreed to. The broadcaster is obliged to increment (or change) the consent version in the dashboard every time they update their terms & conditions or marketing agreement.

Parameters

NameTypeDescription
publisherToken*stringYour publisher token
customerEmail*stringThe email address of the user you’re setting the consent for
name*stringConsent name (one of: terms, privacy, broadcaster_terms, broadcaster_marketing)
state*stringUser’s consent state (one of: accepted, declined)
version*stringConsent definition version (must match the current consent definition version, no possibility of agreeing to past definitions)

Result Parameters

NameTypeDescription
successbooleanInformation about success of submit

API Request/Response

Request

{
  "method": "submitConsent",
  "params": {
     "publisherToken": "bD4TVNJyH1WTAErQxcpjl1k7fmAKZsIK0rKHtp6TdMg0RmIg",
     "customerEmail": "[email protected]",
     "name": "terms",
     "state": "accepted",
     "version": "1"
  },
  "jsonrpc": "2.0",
  "id": 1
}

Response

{
  "result": {
    "success": true
  },
  "id": "1",
  "jsonrpc": "2.0"
}

ErrorCodes

CodeDescription
3Invalid publisher token
23User does not exist
27Broadcaster does not use the consent
28Consent version does not match the current consent definition
29Consent does not exist