# Token and Account Gating

Gating is a concept where to purchase or access one thing, you have to own another. DPub enables creators to gate the purchase or airdrop of NFTs by:

* Account ID
* Token ID
* Start Date

For example, to purchase token 0.0.651316, you must own token 0.0.642225.

## The Buyer Experience

For buyers, to purchase your NFT they must log in. They will be presented with a button that states "Connect Wallet to Purchase."

![](/files/Y9DHyB230B7ELvy53dj9)

After the buyer has logged in, the buyer will be able to purchase through the standard process if they pass the gating test (token id, account id, or start date)

## Token Gating

To Token Gate an NFT, go to Published NFTs and click the NFT you would like to gate.

![](/files/xWGyVLw3XwrPvVIEpUJ5)

Go the Restrictions and enter the token id and click "Add Token ID" button.&#x20;

![](/files/QPOdPa0XOuZPHRla8Rp7)

To delete a token, simply click on the token id that you would like to delete

## Account ID Gating

Account ID gating is done the same way as token gating. Simply type (or paste) the account id of the party you wish to be able to purchase (or airdrop) the token to and click "Account ID".

To delete, simply click on the account id (x).

{% hint style="info" %}
You can not stack account gating and token gating on top of each other as of now. For the time being, use one or the other mechanisms for token gating instead of both of them.
{% endhint %}

## Number per Buyer

For airdrops, especially, you don't want one buyer to be able to keep refreshing and take all of your airdrops.  Set the number per buyer to restrict how many a user can purchase.


---

# 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.dpub.xyz/creator-studio/token-and-account-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.
