Moralis Now Automatically Updates NFT Metadata

Good news!

Moralis automatically updates metadata.

Update 2022-05-27

Only metadata for token uri that points to IPFS gets updated automatically now.
We will come with updates for non IPFS metadata.

Here is how it works

Whenever you request a token using the endpoints below if will be queued for refresh.

/nft/{address}/{token_id}
/nft/{address}/{token_id}/owners
/nft/{address}/{token_id}/transfers

In a few days we will also add that no matter which endpoint you call - if that endpoint returns any NFTs they will all be scheduled for refresh. That will include the following endpoints:

/{address}/nft
/nft/{address}
/nft/{address}/transfers
/{address}/nft/transfers
/nft/{address}/trades

The goal is that whenever an NFT token is requested by anyone using Moralis through any endpoint - that token will be scheduled for refresh.

Cool-Off Period

Refreshing metadata is resource intensive - therefore we have a cool-off period during which the same token canโ€™t be refreshed more than once.

If the token_uri points to IPFS - we allow refreshing every 10 minutes for each individual token.

If the token_uri doesnโ€™t point to IPFS but to a third party server - we allow refreshing every 1 hour for each individual token.

2 Likes

Using the Web3API SDK, it seems that reSyncMetadat resyncs successfully the token_uri but doesnโ€™t refetch the metadata.

Code example below, token_uri is updated but metadata returns the old metadata still.

await Moralis.Web3API.token.reSyncMetadata({
                chain: 'eth',
                address: contract,
                token_id: tokenId.toString(),
                flag: 'uri',
                mode: 'sync',
            })
1 Like

please make a new thread - this thread is not about this endpoint - this post is announcing auto refresh - thanks

1 Like