GuidesAPI ReferenceRelease Notes
HomeLog InHome
Guides

BlazeContentRestrictionReason

BlazeContentRestrictionReason

BlazeContentRestrictionReason is an enum that says why playback of an item was refused. It is passed to onContentRestricted. The full set is exposed rather than a few coarse buckets because the appropriate response differs per reason: offering a purchase prompt on geoBlocked would promise the viewer something paying cannot deliver, and externalUserTokenExpired calls for a fresh token rather than a paywall. Use isRetriable when only the coarse distinction matters.

Reasons added after your SDK version was built arrive as unknown rather than failing.

public enum BlazeContentRestrictionReason: String, CaseIterable, Hashable {
    case subscriptionRequired = "SubscriptionRequired"
    case geoBlocked = "GeoBlocked"
    case vpnBlocked = "VpnBlocked"
    case deviceLimitReached = "DeviceLimitReached"
    case contentNotAvailable = "ContentNotAvailable"
    case externalUserTokenMissing = "ExternalUserTokenMissing"
    case externalUserTokenInvalid = "ExternalUserTokenInvalid"
    case externalUserTokenExpired = "ExternalUserTokenExpired"
    case rateLimited = "RateLimited"
    case temporarilyUnavailable = "TemporarilyUnavailable"
    case unknown = "Unknown"

    public var isRetriable: Bool { get }
}
ValueDescription
subscriptionRequiredThe viewer needs a subscription to watch this content.
geoBlockedThe content is not available in the viewer's region.
vpnBlockedThe request appears to come through a VPN or proxy.
deviceLimitReachedThe viewer is already streaming on the maximum number of devices.
contentNotAvailableThe content is not available for playback, including when the service answers without a playable URL.
externalUserTokenMissingNo viewer token was supplied, so entitlement cannot be established.
externalUserTokenInvalidThe supplied viewer token was rejected.
externalUserTokenExpiredThe supplied viewer token has expired; the host app should provide a fresh one.
rateLimitedToo many requests. Worth retrying later.
temporarilyUnavailableThe service is briefly unavailable, or the SDK could not get an answer from it (for example a network failure or an unexpected server response). Worth retrying later.
unknownThe reason could not be recognized, including reasons added after this SDK version.

When the SDK could not get an answer at all, or the answer carried no playable URL, the item is not held as refused: the SDK asks about it again the next time the viewer reaches it, rather than on a timer.

isRetriable

isRetriable is a convenience for when only the coarse distinction matters: whether the same request could succeed later without anything changing for the viewer. It is true only for the transient cases (rateLimited, temporarilyUnavailable). A subscription or region problem does not resolve by retrying, so it is false there. The SDK does not retry by itself; acting on a retriable reason is your decision.


Did this page help you?