submitConsent

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.

📘

You can try that method by clicking here

Parameters

Name

Type

Description

publisherToken*

string

Your publisher token

customerEmail*

string

The email address of the user you’re setting the consent for

name*

string

Consent name (one of: terms, privacy, broadcaster_terms, broadcaster_marketing)

state*

string

User’s consent state (one of: accepted, declined)

version*

string

Consent definition version (must match the current consent definition version, no possibility of agreeing to past definitions)

Result Parameters

Name

Type

Description

success

boolean

Information 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

Code

Description

3

Invalid publisher token

23

User does not exist

27

Broadcaster does not use the consent

28

Consent version does not match the current consent definition

29

Consent does not exist