# site\_gate\_set

Source: <https://telegafirst.com/docs/mcp-tool-site-gate-set>
Locale: ru
releaseGitSha: fc570c76ffc9cb87e2462d45b14f5c1b52fbaf0d
sourceContentDigest: a190209a658c3cba1a7c1330b960a1049e906f83156b9261317e962ea71320bd
Version: 4

# site\_gate\_set

Open a page, or one block of it, only to part of the audience. Effective at once; a republish keeps it. One rule per TARGET: \`path\`, a mask of the served path (\`/pricing.html\`, \`/lessons/\`, \`/lessons/\*\`; \`\*\` only last; \`/pricing\` does not match \`pricing.html\`), plus optional \`block\` (lowercase letters, digits, -). Setting a target again updates it. A block is the bundle file \`\_\_telegafirst/blocks/{block}.html\`; the page holds \`\<div data-tgf-block="{block}">teaser\</div>\` and \`\<script src="/widget/blocks.v1.js" async>\</script>\`; a script inside a block does not run. Without \`block\` the whole page is closed and a visitor who fails goes to sign-in (\`mode\` ignored). \`any\_of\` (1-10) = who gets in; ONE of the conditions opens it: \`{"kind":"product","catalog\_id":5}\` (bought it; a 0-price product counts); \`{"kind":"subscription"}\` (any live paid subscription; with \`catalog\_id\`: to that item, trial and 0-price too); \`{"kind":"channel"}\` (in the public channel); \`{"kind":"signed\_in"}\` (any signed-in customer of this business); \`{"kind":"segment","saved\_segment\_id":12}\` or \`{"kind":"segment","filter":{...}}\` (filter of \`describe\_segment\_axes\`: include groups minus \`exclude\`; axes partner/referrals\_of, inviter/invited\_by, manual = user list); \`{"kind":"password","password":"acme"}\` (made with \`site\_password\_set\`). Where masks overlap, the most specific one decides and overrides the general (\`/kp/acme/\*\` over \`/kp/\*\`); a block follows the most specific mask of its page. The platform keeps passwords; never put one in HTML or JS. The sign-in page is ready; your own = \`login\_path\` (open, outside every closed mask) + \`/widget/gate.v1.js\` (\`tgf.gate.unlock(password)\`). Recipes: several clients = nested masks, \`/kp/\*\` \[shared], \`/kp/acme/\*\` \[acme, shared]; data for the admitted = a JSON file under the closed mask; a third-party API key = \`secret\_put\`. \`mode\`: \`hide\` (default) or \`lock\` (stub with Sign in / Get access). \`is\_active:false\` pauses. \`unprojected\_hosts\`>0: some edges catch up soon. \`rule.id\` goes to \`site\_gate\_remove\`.

## Права и условия

required\_scopes: ALL.

| Поле | Значение |
| - | - |
| description | "Open a page, or one block of it, only to part of the audience. Effective at once; a republish keeps it. One rule per TARGET: \`path\`, a mask of the served path (\`/pricing.html\`, \`/lessons/\`, \`/lessons/\*\`; \`\*\` only last; \`/pricing\` does not match \`pricing.html\`), plus optional \`block\` (lowercase letters, digits, -). Setting a target again updates it. A block is the bundle file \`\_\_telegafirst/blocks/{block}.html\`; the page holds \`\<div data-tgf-block=\\"{block}\\">teaser\</div>\` and \`\<script src=\\"/widget/blocks.v1.js\\" async>\</script>\`; a script inside a block does not run. Without \`block\` the whole page is closed and a visitor who fails goes to sign-in (\`mode\` ignored). \`any\_of\` (1-10) = who gets in; ONE of the conditions opens it: \`{\\"kind\\":\\"product\\",\\"catalog\_id\\":5}\` (bought it; a 0-price product counts); \`{\\"kind\\":\\"subscription\\"}\` (any live paid subscription; with \`catalog\_id\`: to that item, trial and 0-price too); \`{\\"kind\\":\\"channel\\"}\` (in the public channel); \`{\\"kind\\":\\"signed\_in\\"}\` (any signed-in customer of this business); \`{\\"kind\\":\\"segment\\",\\"saved\_segment\_id\\":12}\` or \`{\\"kind\\":\\"segment\\",\\"filter\\":{...}}\` (filter of \`describe\_segment\_axes\`: include groups minus \`exclude\`; axes partner/referrals\_of, inviter/invited\_by, manual = user list); \`{\\"kind\\":\\"password\\",\\"password\\":\\"acme\\"}\` (made with \`site\_password\_set\`). Where masks overlap, the most specific one decides and overrides the general (\`/kp/acme/\*\` over \`/kp/\*\`); a block follows the most specific mask of its page. The platform keeps passwords; never put one in HTML or JS. The sign-in page is ready; your own = \`login\_path\` (open, outside every closed mask) + \`/widget/gate.v1.js\` (\`tgf.gate.unlock(password)\`). Recipes: several clients = nested masks, \`/kp/\*\` \[shared], \`/kp/acme/\*\` \[acme, shared]; data for the admitted = a JSON file under the closed mask; a third-party API key = \`secret\_put\`. \`mode\`: \`hide\` (default) or \`lock\` (stub with Sign in / Get access). \`is\_active:false\` pauses. \`unprojected\_hosts\`>0: some edges catch up soon. \`rule.id\` goes to \`site\_gate\_remove\`." |
| domain | "site" |
| name | "site\_gate\_set" |
| platform\_version | "42248466c94e00eec0d71429ed34a30fd211e9b0" |
| required\_scopes | \["site:write"] |
| risk | "write" |
| scope | "site:write" |
| title | "Site Gate Set" |

## Входные параметры

[site\_gate\_set: inputSchema](https://telegafirst.com/docs/schema-f580d5d942754d392bb81b61ce53b674002c12cda7959229096ea1a04ef03df0)

## Результат

[site\_gate\_set: outputSchema](https://telegafirst.com/docs/schema-9d6bea9bdd4a66d9d664585514553bdbe96ef4af8a99aa63bf4bfc07306ce4e7)
