Back to All

Get Current Owner of NFT

Hey there!

I'm trying to snag the current owner of an NFT. Right now, I'm using getOwnersForNft(NftAddress, NftTokenId), but it's giving me an array of all the NFT owners. I tried grabbing the owner by using the index 0 value like this:

const response = await alchemy.nft.getOwnersForNft(contractAddress, takerNFTTokenId[index]);
const owner = response.owners[0];

But, it's not consistently returning the correct owner address. Sometimes the right one is at index 1, and other times it's somewhere in the middle of the array. Is there another function I can use to reliably get the current owner? Thanks!