getNFTsForContract doesn't update metadata

you can find example here: https://docs.moralis.io/moralis-server/web3-sdk/token#resyncmetadata

you can also call it directly from web3api interface: https://admin.moralis.io/web3Api

you can not call it more then once per second

Moralis now supports refresh for all NFTs automatically Moralis Updates NFT Metadata

Iā€™m still not able to get metadata updated for a contract Iā€™m pulling. Iā€™ve tried all approaches in this thread:

  • getTokenIdMetadata
  • getTokenIdOwners
  • reSyncMetadata

It was great to see theoretical ā€˜supports refresh for all NFTs automaticallyā€™, but Iā€™ve been calling these endpoints for the past 3 days, and still metadata has never refreshed for the token. Hereā€™s the response from getTokenIdMetadata. Is there anything else I can do to get this to refresh?

amount: "1"
ā€‹block_number: "14719796"
block_number_minted: "14719796"
contract_type: "ERC721"
last_metadata_sync: null
last_token_uri_sync: null
metadata: "{\"animation_url\":\"\",\"description\":\"VX Deluxe emerge from the ether to aid Bears Deluxe on their quest into the metaverse. 6,900 1:1 matches to the original Bears Deluxe collection with an additional 3,100 Avatars to join in the adventure. VX Deluxe are fully animated and rigged 3D avatars ready for integration into any 3D game engine. They will also be playable in the Sandbox Game, along with original creations from the Bears Deluxe team.\",\"image\":\"https://bearsdeluxe.mypinata.cloud/ipfs/QmSDommgBGjBCHjmLR49z5Tz6UhBUYdUzaaBEnLD3XzwoB\",\"attributes\":[],\"external_url\":\"https://bearsdeluxe.io\",\"name\":\"VX Deluxe #1355\"}"
name: "VX Deluxe"
owner_of: "0xd62356ab5dafe3c6c741fa8a59479500ab05737a"
symbol: "VX Deluxe"
synced_at: "2022-05-14T02:58:30.276Z"
token_address: "0xaf9f836cc3e4019addd529c2579e44938252a1ae"
token_hash: "8532426fb3b165a134169a65273821fd"
token_id: "1355"
token_uri: "https://bearsdeluxe.mypinata.cloud/ipfs/Qmcd7sGdtEkCp32vv7GUzHfWLN54C4rGn1fJv5uKjEZsGo/1355"

Hello, what should the metadata be for 1355? Is the token_uri correct? The metadata matches what is in https://bearsdeluxe.mypinata.cloud/ipfs/Qmcd7sGdtEkCp32vv7GUzHfWLN54C4rGn1fJv5uKjEZsGo/1355 currently. Metadata updates from the token_uri.

Right, its the token_uri that is incorrect.

The project updated the token_uri during the project reveal. I assumed metadata refresh would pull the latest token_uri from the contract and update with that.

This is the updated URL for that token:
https://bearsdeluxe.mypinata.cloud/ipfs/QmRdgXLpxisJjTSHDmZrYxxTkZVNZNfUf56oMAW15v4T9u/1355

did you try reSyncMetadata with uri flag?

did you try reSyncMetadata with uri flag?

Ok, this worked! Thank you. So will the automatic refresh endpoints not do URI refreshes? Most projects Iā€™m involved with are on IPFS so metadata itself is immutable and cannot refresh. Itā€™s the URI that needs to be updated and refreshed.

the automatic refresh will also handle changes in token uri

@cryptokid it seems it worked for that first token. Iā€™ve since tried to refresh more tokens on the same contract using the same API (reSyncMetadata with uri flag) and the URI is not updating on the tokens. Itā€™s been 2 days, Iā€™ve been calling the endpoint over and over, and no refresh.

Can you post these additional token_ids with the token_uri they should have.

that is not the expected behaviour.

This is the token address?

can you give an example of token_id for which it doesnā€™t work to resync metadata?

@cryptokid my tokenUri response NEVER updates!

Wow, Moralis is super broken I guess??

Here is an example:

address: ā€œ0x7441EB02527d1c997Baf7484cc9deeDA55d9FadCā€,
chain: ā€œMumbaiā€,

Call and see that the metadata from Moralis never changes even though calling smart contract directly gives the correct responseā€¦ :man_shrugging:

did you try resyncMetadata endpoint with uri flag?

@cryptokid Tried that, no difference.

also, I have to call this endpoint for EVERY SINGLE tokenId? Jesus, what is even the point of using Moralis at that point? I might as well just call ā€œtokenUriā€ for every token directly.

can you provide the token id, address, chain, what is the expected token id?

This Moralis API is nowhere near ready for production use sadly. I am extremely disappointedā€¦ :cry:

I am curious to hear from @ivan why this is so brokenā€¦

Why would you post this update that things resync on their own if itā€™s not actually true?

is this solved ?
I canā€™t seem to update metadatas using unityā€¦

This is the method I use with a ā€œrefreshā€ button:

public async void resyncMetadata()
    {
        await Moralis.Web3Api.Token.ReSyncMetadata(address: "0x34d85754fbad12eca81e2afe6a7648051574a63c", tokenId: "2", GameManager.ContractChain);

    }

Its been a few hoursā€¦

does it have to update metadata or also the token uri?

if you need to update the token uri then you have to use uri flag