Restriction reason.
See here » for the full flow to use for restricted or age-gated content.
restrictionReason#d072acb4 platform:string reason:string text:string = RestrictionReason;
| Name | Type | Description |
|---|---|---|
| platform | string | Platform identifier (ios, android, wp, all, etc.), can be concatenated with a dash as separator (android-ios, ios-wp, etc) |
| reason | string | Restriction reason (porno, terms, etc.). Ignore this restriction reason if it is contained in the ignore_restriction_reasons » client configuration parameter. |
| text | string | Error message to be shown to the user |
The MTProto API has multiple configuration parameters that can be fetched with the appropriate methods.
Some legislations require age verification to view restricted content: Telegram implements this through the Main Mini App of a special bot.