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; use isRetriable when only the coarse distinction matters.

Each case carries the exact string from the content service contract as its value, so the client and the service cannot drift apart. New reasons added on the service after the SDK version was built degrade to UNKNOWN rather than failing.

enum class BlazeContentRestrictionReason(val value: String) {
    SUBSCRIPTION_REQUIRED(value = "SubscriptionRequired"),
    GEO_BLOCKED(value = "GeoBlocked"),
    VPN_BLOCKED(value = "VpnBlocked"),
    DEVICE_LIMIT_REACHED(value = "DeviceLimitReached"),
    CONTENT_NOT_AVAILABLE(value = "ContentNotAvailable"),
    EXTERNAL_USER_TOKEN_MISSING(value = "ExternalUserTokenMissing"),
    EXTERNAL_USER_TOKEN_INVALID(value = "ExternalUserTokenInvalid"),
    EXTERNAL_USER_TOKEN_EXPIRED(value = "ExternalUserTokenExpired"),
    RATE_LIMITED(value = "RateLimited"),
    TEMPORARILY_UNAVAILABLE(value = "TemporarilyUnavailable"),
    UNKNOWN(value = "Unknown")
}
ValueDescription
SUBSCRIPTION_REQUIREDThe viewer needs a subscription to watch this content.
GEO_BLOCKEDThe content is not available in the viewer's region.
VPN_BLOCKEDThe request appears to come through a VPN or proxy.
DEVICE_LIMIT_REACHEDThe viewer is already streaming on the maximum number of devices.
CONTENT_NOT_AVAILABLEThe content is not available for playback, including when the service answers without a playable URL.
EXTERNAL_USER_TOKEN_MISSINGNo viewer token was supplied, so entitlement cannot be established.
EXTERNAL_USER_TOKEN_INVALIDThe supplied viewer token was rejected.
EXTERNAL_USER_TOKEN_EXPIREDThe supplied viewer token has expired; the host app should provide a fresh one.
RATE_LIMITEDToo many requests. Worth retrying later.
TEMPORARILY_UNAVAILABLEThe service is briefly unavailable, or the SDK could not get an answer from it (for example a network or server error). Worth retrying later.
UNKNOWNThe reason could not be recognized, including reasons added after this SDK version.

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 (RATE_LIMITED, TEMPORARILY_UNAVAILABLE). A subscription or region problem does not resolve by retrying, so it is false there.


Did this page help you?