restrictionReason #

Restriction reason.

See here » for the full flow to use for restricted or age-gated content.

Layer 223

restrictionReason#d072acb4 platform:string reason:string text:string = RestrictionReason;

Parameters #

NameTypeDescription
platformstringPlatform identifier (ios, android, wp, all, etc.), can be concatenated with a dash as separator (android-ios, ios-wp, etc)
reasonstringRestriction reason (porno, terms, etc.). Ignore this restriction reason if it is contained in the ignore_restriction_reasons » client configuration parameter.
textstringError message to be shown to the user

Type #

RestrictionReason

Client configuration #

The MTProto API has multiple configuration parameters that can be fetched with the appropriate methods.

Age verification #

Some legislations require age verification to view restricted content: Telegram implements this through the Main Mini App of a special bot.