# Guild.xyz for token gating

With Guild, you can use your Badges to distribute permissions in Discord channels, Telegram groups, GitHub repos, and Google Docs. 🔑

Guild allows you to build complex logic around which tokens members have to hold in order to access spaces and resources across the apps mentioned above. You can create and / or logic to include multiple tokens in your gate.

### Adding a Badge to a token-gate on Guild <a href="#block-0c3075e8de13480c9fbb9f4d8efd840a" id="block-0c3075e8de13480c9fbb9f4d8efd840a"></a>

If Guild is already set up and you want to add a Badge to the token-gate, simply edit the role and select ‘Otterspace’ from the list of integrations.

This will open a drop-down list where you can search and choose the Badge you want to use in the token-gate. If a holder has an expired Badge, it will be ignored.

![image](https://docs.otterspace.xyz/_next/image?url=https%3A%2F%2Fassets.super.so%2F5e10f36d-c96f-402d-8656-67f77cc28c6d%2Fimages%2F442e9d75-a452-4e90-a409-ba707bd0c09b%2FScreenshot_2022-10-13_at_14.03.55.png\&w=3840\&q=80)

### Setting up Guild for the first time <a href="#block-da06910b4eb841568d528e8b7d983b35" id="block-da06910b4eb841568d528e8b7d983b35"></a>

Guild works by setting requirements to get roles, which have rewards attached to them. A requirement might be “has the Core Contributor Badge” a role might be “Core Contributor” and a reward might be “gets access to the Discord role ‘core\_team’”.

First, set up your community and roles, then attach Badge requirements to the roles (see above). Finally, select which rewards are associated with each role.

Guild has a great explanation [here](https://docs.guild.xyz/guild/guides/readme#making-your-first-guild).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.otterspace.xyz/integrations/guild.xyz-for-token-gating.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
