Geo-blocking

Determine in which countries your channels can be viewed

Geo-blocking allows you to block content in certain countries. You can easily enable/disable it through the management console or via the API. We'll discuss both approaches in this guide.

How it works

You can enable geo-blocking on the main channel by updating the publicationConfig object of a channel. For example: if you want to enable geo-blocking and restrict the viewers to only Belgium and Germany, you have to pass the following request. Note that countries should be passed in ISO 3166-1 alpha-2 codes.

{
  "publicationConfig": {
    "geoBlocking": {
      "enabled": true,
      "allowedCountries": ["BE", "DE"]
    }
  }  
}

When you want to disable geo-blocking, you can pass the same request as above, but with:

  • "enabled": false
  • allowedCountries can be omitted as it will be ignored

The same can be done for channel alias. You just have to use the right endpoint for it.

Example: combination of channel and alias geo-blocking

Suppose you provide a stream that you'll distribute to end customers:

  • One customer has the rights to share the stream with Belgian viewers
  • The other one can show the stream in the UK and USA
  • A third one only in France

In such a case, you can create 3 aliases, one for each customer, so you can easily track customer specific analytics as well later one.

As the main channel id channel-id won't be used, we can geo-block it completely: someone using this channel ID won't be able to see it anywhere in the world.

For our first customer, we share the channel ID alias-1, we can enable geo-blocking and restrict the access to Belgium.
Our second customer gets channel ID alias-2, we do the same, but restrict to the US and UK.
Lastly, our third customer will receive alias-3 from us. This stream will be geo-blocked everywhere, but not in France.

1414

Example of geo-blocking setup with channel and aliases

Managing geo-blocking in the console

You can change your geo-blocking settings per channel and channel alias. Just navigate to a channel details page and scroll down to the different playout configurations. Clicking on the security tab will give you a few options.
Enabling and disabling geo-blocking can easily be done by the switch. When enabled, countries can be added to the list.
Don't forget to hit "Save" to confirm your changes!

1323

Geo-blocking settings in the console