# Testing

## Frontend

### Token Gates

There are two scenarios you'll run into when building token-gated apps.&#x20;

You either (A) *have* the required tokens or (B) you *don't have* the required token.

#### (A) You have the required tokens

If you hold the token you are using to gate your product, then manual testing is trivial. You can login with your wallet that holds the necessary tokens to pass the token gate and verify everything works as expected. Similarly, you can login with a different wallet that doesn't hold the required tokens and verify you are blocked from accessing the token gated content.

#### (B) You don't have the required tokens

NFTs are typically limited in supply, so it's common to not own the required tokens for every token gated part of your application. This is especially pertinent for application that has separate communities for token holders, like [BEB](https://beb.xyz/).&#x20;

The simplest way to test token gated apps, which you don't have the required tokens for, is to use the `allowedWallets` parameter for every login request in your app. Login requirements are always treated as a logical OR, meaning users are allowed if they meet ***any*** of the requirements.

With `allowedWallets` you can allow your teammates or service accounts to access content that they do not hold the necessary tokens for. You can read more about how to use `allowedWallets` in the [quick start guide.](/picket-docs/quick-start-guides/quick-start-guides/restrict-access-to-specific-wallets.md#login-user-w-a-allowed-wallet-list)

## Backend

### APIs

You can use the [Picket API ](/picket-docs/reference/api-reference/auth.md)or [Node SDK](/picket-docs/reference/libraries-and-sdks/node.js-library-picket-node.md#usage-quick-start) to generate access tokens (JWT) for API integration tests.&#x20;


---

# 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.picketapi.com/picket-docs/reference/concepts/testing.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.
