Allow a blockchain address to transfer and burn fungible tokens

/v3/blockchain/token/approve

2 credits per API call

Allow a blockchain address (the spender parameter in the request body) to transfer and burn fungible tokens on behalf of the smart contract owner.

This API is supported for the following blockchains:

  • BNB Smart Chain
  • Celo
  • Ethereum
  • Harmony
  • Klaytn
  • Polygon
  • Flare
  • Cronos
  • Base
  • Avalanche
  • Fantom
  • Optimism

Signing a transaction
When allowing a blockchain address to transfer and burn fungible tokens, you are charged a fee for the transaction, and you must sign the transaction with the private key of the blockchain address from which the fee will be deducted.

Providing the private key in the API is not a secure way of signing transactions, because the private key can be stolen or exposed. Your private keys should never leave your security perimeter. You should use the private keys only for testing a solution you are building on the testnet of a blockchain.

For signing transactions on the mainnet, we strongly recommend that you use the Tatum Key Management System (KMS) and provide the signature ID instead of the private key in the API. Alternatively, you can use the Tatum JavaScript client.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
string
enum

Type of testnet in query. The default type is based on the currency: ethereum-sepolia for ETH, and flare-coston for FLR. This parameter is valid only for ETH or FLR invocations with a testnet API Key. For mainnet API Key, this value is ignored. The currency/chain must be specified to determine the applicable set of testnet types.

Allowed:
Body Params
string
enum
required

The blockchain to work with

string
required
length between 42 and 43

The address of the smart contract

string
required
length between 42 and 43

The blockchain address to be allowed to transfer or burn the fungible tokens

string
required

The amount of the tokens allowed to be transferred or burnt

string
required
length between 66 and 66

The private key of the smart contract's owner; the fee will be deducted from the owner's address

fee
object

The custom defined fee; if not present, will be calculated automatically

number
≥ 0

The nonce to be set to the transaction; if not present, the last known nonce will be used

Headers
string
enum

Type of testnet in header. The default type is based on the currency: ethereum-sepolia for ETH, and flare-coston for FLR. This parameter is valid only for ETH or FLR invocations with a testnet API Key. For mainnet API Key, this value is ignored. The currency/chain must be specified to determine the applicable set of testnet types.

Allowed:
Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json