I am trying to get NFT metadata via the Token API:
const moralisNft: IMoralisNftMetadata = <IMoralisNftMetadata> await Moralis.Web3API.token.getTokenIdMetadata({
address: contractAddress,
token_id: tokenId,
chain: this.moralisChain
})
Contract: 0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85
Token Id: 64541599517874338551765946070328721926123343285885017130316322431075400526172
chain: eth
I have tried on opensea, and it works just fine: https://opensea.io/assets/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/64541599517874338551765946070328721926123343285885017130316322431075400526172.
However, from Moralis, the metadata
and token_uri
always come back as null
. To try and fix this, I have tried to use the reSyncMetadata API. I consistently get a 202, indicating that the NFT metadata will be synced, but the results never change. The response from the getTokenIdMetadata API always has token_uri
, synced_at
and metadata
as null
, and syncing
as 1
.
It would be fine if metadata
wasn’t syncing by itself, but since token_uri
isn’t working either, I can’t even fetch the metadata myself. Please help!