[SOLVED] Why endpoint return me back wrong owner_of

Hello,
I’m using this endpoint to return the details or metadata for the NFT, and I notiesd the owner_of is wrong
https://deep-index.moralis.io/api/v2/nft/${contract_address}/${token_id}?chain=${chain}&format=decimal

we need more info, like the contract address and token id

contract_address: 0xf553ed185e1a6766a4df9437cc0f470787c4d3cf
token_id: 0

Screenshot_165 Screenshot_166

there are a lot of owners for that token id
https://polygonscan.com/token/0xf553ed185e1a6766a4df9437cc0f470787c4d3cf?a=0#inventory

you will get a random one for that API endpoint

I’m using 2 endpoints:
1- Endpoint to get all nfts by owner wallet address
2- Endpoint to get nft by contract_address and token_id

so what i need to do for the 2nd endpoint to return me back the same owner_of that I got it from the 1st endpoint?

you can assume that the owner from first request has that token_id, you can see different owners only for ERC1155 contracts where multiple owners can have the same token id

in this case if it is an ERC1155 token id you can ignore the owner returned by the second endpoint

1 Like