Token approvals

List the contracts that can spend a wallet's tokens, and revoke them

GET /api/approvals/ lists the active token approvals for a wallet: every ERC-20 allowance and every NFT operator (ApprovalForAll) that is still live. Use it to build a "who can spend my tokens" page with a revoke button.

Each approval is checked on-chain when you request it, so spent or revoked allowances never show up. Each item also comes with a ready-made revoke call for the user to sign in their wallet. TokenKit never holds keys.

Endpoint

ParameterRequiredDescription
account_addressYesThe wallet address (hex, padded or not)
Code
bash
1curl 'https://api.tokenkithq.io/api/approvals/?account_address=0x03993fc6898b6191f4fb422c66baedf47c0ae71ddf657aada881a5f54d9068b1' \
2 -H 'api-key: YOUR_API_KEY'

Response

Code
json
1{
2 "success": true,
3 "data": {
4 "owner": "0x03993fc6898b6191f4fb422c66baedf47c0ae71ddf657aada881a5f54d9068b1",
5 "approvals": [
6 {
7 "token_address": "0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d",
8 "spender_address": "0x0515f6e019747f46a5e9e89e87adb626a15234949e0da10061c19b6b15aca1fe",
9 "type": "allowance",
10 "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
11 "unlimited": true,
12 "verified": true,
13 "last_approved_block": 16231516,
14 "last_approved_txhash": "0x01f10bb8ac6b6dd170e5373d05282566c210688b0ceb038e741c64d9841674e2",
15 "last_approved_at": "2026-10-11T16:00:50Z",
16 "revoke_call": {
17 "contract_address": "0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d",
18 "entrypoint": "approve",
19 "calldata": ["0x0515f6e019747f46a5e9e89e87adb626a15234949e0da10061c19b6b15aca1fe", "0", "0"]
20 },
21 "token": { "name": "Starknet Token", "symbol": "STRK", "decimals": 18 }
22 }
23 ],
24 "truncated": false
25 }
26}

Field reference

FieldWhat it means
approvals[].typeallowance for an ERC-20 approve, or operator for an NFT ApprovalForAll (the spender can move every NFT in the collection)
approvals[].allowanceCurrent allowance in the token's smallest unit, as a string. null for operators
approvals[].unlimitedtrue when the allowance is at least 2^128 − 1 (wallets use u256 max or u128 max for "unlimited"), and always true for operators. These carry the most risk
approvals[].verifiedtrue when the allowance was just read on-chain. false means the on-chain check failed (for example, an RPC timeout), and allowance is the last value seen in the approval events. It is shown rather than hidden so a failed check never makes a live approval look revoked
approvals[].last_approved_*Block, transaction and UTC time of the latest approval event for this pair
approvals[].revoke_callThe call to sign to revoke: approve(spender, 0) for allowances, set_approval_for_all(operator, false) for operators. calldata is ready to pass to a wallet's execute
approvals[].tokenName, symbol and decimals if TokenKit has indexed the token, otherwise null
truncatedtrue if the wallet has more than 200 approved pairs. Only the 200 most recent are checked and returned

Notes

  • Coverage starts at block 15,500,000 (27 September 2026). Approvals granted before that block are not indexed yet and won't appear, even if they are still active. Older history may be added later.
  • Spent allowances disappear. transferFrom reduces an allowance, and not every token emits an event when it does. That's why each approval is read on-chain before it's returned.
  • Single-NFT approvals are not listed. An ERC-721 approve(to, token_id) is cleared automatically when the NFT is transferred, so only ApprovalForAll operators are returned for NFTs.
  • Caching. A fully verified response is cached for 60 seconds per wallet. After the user signs a revoke, the item can still appear for up to a minute.
  • Errors. A missing or non-hex account_address returns 400.