Approve/Revoke Transfers of All Token

Grant or revoke approval to to to send all tokens owned by from in a specified contract.

You will see in Submitted in the response even when you enter the wrong address or token ID, or when the from and owner are different. But that does not mean that it is successfully Committed). To confirm transaction status, use Get Transaction Receipt from the Wallet API.

Request
Security:
path Parameters
contract-address-or-alias
required
string

Contract address (in hex.) or alias.

header Parameters
x-chain-id
required
string

Kaia Network Chain ID (1001 or 8217)

x-krn
string

KRN (KAS Resource Name) unique to an Account Pool

Request Body schema: application/json
from
required
string

The Kaia account address of the owner.

to
required
string

The Kaia account address to be granted authority to transfer the token.

approved
boolean

The boolean value that indicates whether authorization was granted/denied. The default value is true.

Responses
200

Your request was successful.

400

Your request is not valid.

401

The credential you entered is invalid.

post/v2/contract/{contract-address-or-alias}/approveall
Request samples
application/json
{
  • "from": "0x9eaf20b40e0f1ced5dbba6f5cfb0d3e12b0534f4",
  • "to": "0xDc277E2D89b92336A4ee80be3c7142443FDaDE47",
  • "approved": true
}
Response samples
application/json

Your request was successful.

{
  • "status": "Submitted",
  • "transactionHash": "0xb5a0618be3508b3fe22e35aa96063005dd4c557cf040348cc542b0726cc30f7b"
}