Twitch.CustomPowerUpRedemption

WebSocket event schema, payload, and examples

Properties

The properties defined in the event schema, with descriptions.
counter
integer required
customPowerUp
object required
isTest
boolean required
redeemedAt
string required
redemptionId
string
status
string
user
object required
userColor
string
userCounter
integer required
userInput
string

Schema

The JSON Schema for the event payload, if available.
schema.json
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "TwitchCustomPowerUpRedemptionAddEvent",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "user": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "$ref": "#/$defs/TwitchBaseUser"
        }
      ]
    },
    "redemptionId": {
      "type": [
        "null",
        "string"
      ]
    },
    "status": {
      "type": [
        "null",
        "string"
      ]
    },
    "counter": {
      "type": "integer"
    },
    "userCounter": {
      "type": "integer"
    },
    "userColor": {
      "type": [
        "null",
        "string"
      ]
    },
    "userInput": {
      "type": [
        "null",
        "string"
      ]
    },
    "customPowerUp": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "$ref": "#/$defs/TwitchCustomPowerUp"
        }
      ]
    },
    "redeemedAt": {
      "type": "string"
    },
    "isTest": {
      "type": "boolean"
    }
  },
  "$defs": {
    "TwitchBaseUser": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": [
            "null",
            "string"
          ]
        },
        "login": {
          "type": [
            "null",
            "string"
          ]
        },
        "name": {
          "type": [
            "null",
            "string"
          ]
        },
        "type": {
          "type": [
            "null",
            "string"
          ]
        }
      }
    },
    "TwitchCustomPowerUp": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": [
            "null",
            "string"
          ]
        },
        "title": {
          "type": [
            "null",
            "string"
          ]
        },
        "bits": {
          "type": "integer"
        },
        "prompt": {
          "type": [
            "null",
            "string"
          ]
        },
        "backgroundColor": {
          "type": [
            "null",
            "string"
          ]
        },
        "userInputRequired": {
          "type": "boolean"
        },
        "maxPerStream": {
          "type": "integer"
        },
        "maxPerUserPerStream": {
          "type": "integer"
        },
        "globalCooldown": {
          "type": "integer"
        },
        "groupName": {
          "type": [
            "null",
            "string"
          ]
        },
        "persistCounter": {
          "type": "boolean"
        },
        "persistUserCounter": {
          "type": "boolean"
        }
      }
    }
  }
}

JSON Payload

An example JSON payload for the event, automatically generated using JSONSchemaFaker
example.json
{
  "user": null,
  "redemptionId": null,
  "status": null,
  "counter": 609,
  "userCounter": -718,
  "userColor": "qeJIzfZZ",
  "userInput": null,
  "customPowerUp": null,
  "redeemedAt": "eW",
  "isTest": false
}

Client Example

Example code showing how to subscribe to this event using the Streamer.bot WebSocket Client
index.js
// Initialize the Streamer.bot WebSocket Client
const client = new StreamerbotClient();

// Subscribe to "Twitch.CustomPowerUpRedemption" events and register a callback
client.on('Twitch.CustomPowerUpRedemption', ({ event, data }) => {
  // Code here will run every time the event is received!
  console.log('Received event:', event.source, event.type);
  console.log('Event data:', data);
});