Represents the information to create a subscribe token.

interface CreateSubscribeToken {
    allowedCountries?: string[];
    allowedIpAddresses?: string[];
    allowedOrigins?: string[];
    bindIpsOnUsage?: number;
    deniedCountries?: string[];
    expires?: number;
    label: string;
    originCluster?: string;
    streams: SubscribeTokenStream[];
    tracking?: {
        trackingId?: string;
    };
}

Properties

allowedCountries?: string[]

Specify the ISO 3166-1 two letter country codes to explicitly allow viewer to watch the stream from. If the viewer's location does not match any of the specified countries, they will be blocked from viewing stream, else they will be allowed to view stream. This geo-fencing rule works in concert with the IP and domain restrictions as well. Specifying geo restriction rules in a token will override account-wide rules. Only one of allowedCountries or deniedCountries should be specified. If the specified streams require authentication, the list of allowed countries can be overridden by the subscribe token.

allowedIpAddresses?: string[]

May specify multiple IPv4 addresses or CIDR notated network blocks. If specified, the token will only be usable from those IP addresses.

allowedOrigins?: string[]

If specified only the domains in list will be allowed in requests to Director API with token. Wildcard subdomains are also allowed, e.g.: "*.demo.com". When unspecified (empty list) there are no domain restrictions.

bindIpsOnUsage?: number

If specified will bind the token to the first X IP addresses used with token in requests to Director API, thus restricting the token to those IP addresses without being known beforehand. Mutually exclusive with allowedIpAddresses option.

deniedCountries?: string[]

Specify the ISO 3166-1 two letter country codes to explicitly deny viewer to watch the stream from. If the viewer's location does match any of the specified countries, they will be blocked from viewing stream, else they will be allowed to view stream. This geo-fencing rule works in concert with the IP and domain restrictions as well. Specifying geo restriction rules in a token will override account-wide rules. Only one of allowedCountries or deniedCountries should be specified. If the specified streams require authentication, the list of denied countries can be overridden by the subscribe token.

expires?: number

Number of seconds until the token expires.

Default Value

If not specified, the token never expires.
label: string

Name for the token that is used to display in the dashboard.

originCluster?: string

Cluster to route specified streams to.

Default Value

Default is the account's default cluster.

List of stream names.

tracking?: {
    trackingId?: string;
}

Tracking Information for the Stream Syndication capability.

Type declaration

  • Optional trackingId?: string

    Tracking identifier for Stream Syndication.