agent402.tools/api/token-allowance
How much of an ERC-20 token a spender contract is approved to move from an owner wallet - the approval check an agent runs before a swap, a bridge, or an x402 transferWithAuthorization flow. Returns the allowance as an exact decimal string scaled by the token's decimals, the raw uint256, and an `unlimited` flag for max-uint style approvals.
POST
https://agent402.tools/api/token-allowanceUptime100% of 3 checks in 30 days
30 days agoToday
Try it
Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.
The response shows up here.
Call it from an agent
// npm install fourohtwo
import { createPayer } from "fourohtwo";
// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://agent402.tools/api/token-allowance", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"owner":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045","network":"ethereum","spender":"0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD","contract":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"}),
});
console.log(await res.json());Example input
{
"owner": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"network": "ethereum",
"spender": "0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",
"contract": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
}