Send Token on Behalf of Owner

Sends a token with an account approved via Approve Token Transfer. You can view the remaining balance of approved tokens by using Get Approved Balance.

Spender

The account that has been granted the authority from the owner to send tokens on his/her behalf.

You can omit the KRN if the spender address is managed by the KIP-7 or Wallet Service account-pool.
Otherwise you have to provide the KRN object in the header (x-krn: krn:{chain-id}:wallet:{account-id}:account-pool:{pool name}).

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)

Request Body schema: application/json
spender
required
string

The Kaia account address to send tokens on behalf of the owner.

owner
required
string

The Kaia account address of the owner granting the authority to send tokens on his or her behalf.

to
required
string

Kaia account address to receive tokens

amount
required
string

Transfer amount (in hex.)

Responses
200

Your request was successful.

400

Your request is not valid.

401

The credential you entered is invalid.

404

The resource you requested doesn't exist.

post/v1/contract/{contract-address-or-alias}/transfer-from
Request samples
application/json
{
  • "spender": "0xd6905b98E4Ba43a24E842d2b66c1410173791cab",
  • "owner": "0x1eb15b3ccb2add3bfe132a4f6ad21ca62cf94e6d",
  • "to": "{wrong address}",
  • "amount": "0x50"
}
Response samples
application/json

Your request was successful.

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