# Revoke Allowance

When using dapps like Uniswap, OpenSea or a custom smart contract, you have to grant them permission to spend your tokens and NFTs, for example if you want to execute a swap function. This is called an allowance. If you don't revoke these allowances, the dapp can spend your tokens forever. Take back control by revoking your allowances.<br>

### &#x20;<mark style="background-color:blue;">Parameters</mark>&#x20;

<table><thead><tr><th width="183.33333333333331">Parameter name</th><th width="97">Type</th><th>Description</th></tr></thead><tbody><tr><td>Token contract</td><td>Text</td><td>Token that was used to be approved, for example USDC or an NFT contract</td></tr><tr><td>Spender</td><td>Text</td><td>Smart Contract address that the allowance was given to, for example the router contract from Uniswap. It also can be another user Wallet Address, because it is possible to give allowance to a wallet address as-well.</td></tr><tr><td>Gas Parameters</td><td>Number</td><td>The gas parameters are optional, use it only if you know what you are doing and you really need it.</td></tr></tbody></table>

### &#x20;<mark style="background-color:blue;">Events</mark>&#x20;

<table><thead><tr><th width="146">Event name</th><th>Description</th></tr></thead><tbody><tr><td>Revoked</td><td>Triggered when the allowance was successfully revoked</td></tr></tbody></table>

Additionally, see [common events and states](/web3-metamask/elements-details/web3-and-metamask.md#common-events) for tx hash or error event.


---

# 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.novabloq.com/web3-metamask/elements-details/web3-and-metamask/revoke-allowance.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.
