> For the complete documentation index, see [llms.txt](https://docs.otherside.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.otherside.xyz/odk-docs/odk-plugin/token-gating.md).

# Token Gating

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfO5atdR1ne8-G1RSfbY8mrzZlMvHs9rJpufadHCeWR7thAvm6BCXKLONPZ52p7WCBN4_7OsNSI-nDBjUV0Bt2hxmj-TNQHLw5u0LbBWD5mUNkjWmdmdOW2adSzB9rELdItSFvDnSZ00LdhmPZz6q9-7t4?key=3WvQRPZVTqRxDfJK6HfL8Q" alt=""><figcaption><p>An example of a Token Gate</p></figcaption></figure>

In-world gating uses the base class `BPM_GatedAreaBase`.

{% hint style="warning" %}
Note: In order to use this in the editor, the blueprint needs access to profile details, therefore, you must be signed in and not in offline mode.
{% endhint %}

This can be done by opening `Editor Preferences > Sign-In Settings` and adding your credentials.

This feature intends to allows devs to limit access to gameplay. Players are limited on a condition. This condition usually concerns token ownership, however, the system allows for completely generic gating.\
\
`BPM_ODK_GatedArea_Plane` is a fully working example that you can use to start gating access to areas of your map. If you plan to create you own type of gated area, we recommend looking at this asset to understand the workings of the system. It has a property `GateCondition` that can be used to configure who can navigate into an area.

## Gating Conditions

Gating conditions can be added to the gated area actor by configuring the `GateCondition` property in the details panel of the `BPM_ODK_GatedAreaBase`.\
In the following example, the gated area is gated on whether a player has any token on the ethereum block chain.

<figure><img src="/files/HplHjEq0zzKPvGKXsP7i" alt=""><figcaption></figcaption></figure>

There are many types of gate condition that are defined in the ODK. The `BP_ODK_GateCondition_AND` and `BP_ODK_GateCondition_OR` are key conditions that allow you to combine conditions together for more complex gating. The following shows a gate condition that requires ownership of both a bored ape and a mutant ape (defined by giving a contract address).

<figure><img src="/files/nOcyZ5KJ1x2Tqg2mHkfD" alt=""><figcaption></figcaption></figure>

If you can not find the condition you need defined within the ODK, you can create your own condition by deriving a new object from `BP_ODK_GateCondition` and overriding the `IsConditionSatisfied` function in your new asset.

<figure><img src="/files/4WFNdctGGQ0c9d4ZACtt" alt=""><figcaption><p>An example of overrideing <code>IsConditionSatisfied</code> to check whether a player has any token from an array of configurable NFT Chins.</p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.otherside.xyz/odk-docs/odk-plugin/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.
