Get NFT By Token Id
Smart contract is responsible for NFTs ownership as it keeps a record of minted NFT per owner .
NFT ownership verification
With this API , you can verify the ownership of a specific NFT by its unique Token_id
.
API Doc
Swagger Doc | ReDoc
Curl call example
curl -X GET "http://0.0.0.0:7000/v2/nftkit/nft/near/chain/{chain}/contract/{contract_id}/NFT/{token_id}"
-H "Content-Type: application/json"
Path parameters:
chain
:[string] chain to work with. Either testnet
or mainnet
.
contract_id
:[string] smart contract account .
token_id
: Unique token_id of the NFT.
Example:
curl -X GET "http://0.0.0.0:7000/v2/nftkit/nft/near/chain/testnet/contract/nft.waltid.testnet/NFT/0"
-H "Content-Type: application/json"
val contractId = "nft.waltid.testnet"
val tokenId = "0"
val chain = "testnet"
val result = NearNftService.getTokenById(contractId, tokenId, chain)
println("operation result: $result")