Skip to main content

Generate Redeem Codes

The platform API provides a simple and secure way for generating redeem codes that can be used to protect your private Livestreams or VODs. This API allows you to create a set number of redeem codes that can be distributed to viewers to allow them to access your content.

To generate redeem codes, you can use the following API:

POST /bv/cms/v1/redeem-codes

The required parameters are:

  • id: The ID of the Livestream or VOD for which you want to generate redeem codes.
  • type:RESOURCE_TYPE_LIVEorRESOURCE_TYPE_VOD.
  • amount: The number of redeem codes you want to generate. The maximum is 1000.

Here's an example of generating 5 redeem codes for a Livestream with ID of12345:

{
"id":"12345",
"type":"RESOURCE_TYPE_LIVE",
"amount":5
}

After making the request, you will receive a response containing an array of redeem codes. Here is an example response:

{
"redeem_codes": [
{
"code":"ABC123"
},
{
"code":"DEF456"
},
{
"code":"GHI789"
},
{
"code":"JKL012"
},
{
"code":"MNO345"
}
]
}

Once you have generated the redeem codes, you can distribute them to your viewers. Viewers must enter the redeem code when visiting the private Livestream. If the redemption code is valid, they will be granted access.