Token_uri now coming back empty

Hi there,

Iā€™m running a query against an address for a particular contract like so:
https://deep-index.moralis.io/api/v2.2/0x7d35a7400ee4587481a776900f37020d723dd3f0/nft?chain=eth&format=decimal&token_addresses[0]=0xb51c757ab7b442bfdb6ed25feb6fc043c7fb40eb&media_items=false

Previously, this would give me results with a token_uri. But now I just get back ā€œtoken_uriā€:null. Has something changed?

{"amount":"1","token_id":"3","token_address":"0xb51c757ab7b442bfdb6ed25feb6fc043c7fb40eb","contract_type":null,"owner_of":"0x7d35a7400ee4587481a776900f37020d723dd3f0","last_metadata_sync":null,"last_token_uri_sync":"2024-01-21T20:09:05.700Z","metadata":null,"block_number":"18644574","block_number_minted":"18644574","name":null,"symbol":null,"token_hash":"7f9a7794a5bbc0a4762b80faa206742f","token_uri":null,"minter_address":"0x7d35a7400ee4587481a776900f37020d723dd3f0","verified_collection":false,"possible_spam":false}

Thanks!

Hi, you can use resync metadata with uri parameter to see if it works.

Did this work in the past for the same nft and token id or this is only an example where token uri is null?

based on etherscan this is an erc20 token, maybe it doesnā€™t implement all the nft standards.

also, it looks like this is the token uri for that token id 3 based on etherscan:

ar://LF_lqeiLd-1JJ6hGsl9gLRyjY0OiPaI9DHNgscKcuDY

Running this https://deep-index.moralis.io/api/v2.2/nft/0xb51c757ab7b442bfdb6ed25feb6fc043c7fb40eb/19/metadata/resync?chain=eth&flag=uri&mode=async for example token ID 19 does seem to bring in the correct token_uri.

Now, for example, I see an URI for token ID 19.

{
  "amount": "1",
  "token_id": "19",
  "token_address": "0xb51c757ab7b442bfdb6ed25feb6fc043c7fb40eb",
  "contract_type": null,
  "owner_of": "0x7d35a7400ee4587481a776900f37020d723dd3f0",
  "last_metadata_sync": null,
  "last_token_uri_sync": "2024-01-22T06:52:06.582Z",
  "metadata": null,
  "block_number": "18644942",
  "block_number_minted": "18644942",
  "name": null,
  "symbol": null,
  "token_hash": "cbc43b1113a83931aa6acc2aecae8448",
  "token_uri": "ar://yMd8dMgm_6uiGI39gLH-wXUC_5yxVTIfb2PSDdXSzxI",
  "minter_address": "0x7d35a7400ee4587481a776900f37020d723dd3f0",
  "verified_collection": false,
  "possible_spam": false
},
{
  "amount": "1",
  "token_id": "24",
  "token_address": "0xb51c757ab7b442bfdb6ed25feb6fc043c7fb40eb",
  "contract_type": null,
  "owner_of": "0x7d35a7400ee4587481a776900f37020d723dd3f0",
  "last_metadata_sync": null,
  "last_token_uri_sync": "2024-01-22T06:52:06.471Z",
  "metadata": null,
  "block_number": "18644944",
  "block_number_minted": "18644944",
  "name": null,
  "symbol": null,
  "token_hash": "61d865f3db18557f8c0f8de7dc179021",
  "token_uri": null,
  "minter_address": "0x7d35a7400ee4587481a776900f37020d723dd3f0",
  "verified_collection": false,
  "possible_spam": false
},

However token ID 24 is still null even though it has the same last_token_uri_sync time.

I also tried running https://deep-index.moralis.io/api/v2.2/nft/0xb51c757ab7b442bfdb6ed25feb6fc043c7fb40eb/24/metadata/resync?chain=eth&flag=uri&mode=async but still the token_uri has not updated for 24.

This all worked in the past for the same NFT.

Code seems fine, but correct me if Iā€™m wrong!
https://etherscan.io/address/0xb51c757ab7b442bfdb6ed25feb6fc043c7fb40eb#readContract#F17

Yes, ar://LF_lqeiLd-1JJ6hGsl9gLRyjY0OiPaI9DHNgscKcuDY is correct.

(Out of interest, how did you lookup the token uri on etherscan?)

in etherscan you can call here directly all the read only methods:

https://etherscan.io/address/0xb51c757ab7b442bfdb6ed25feb6fc043c7fb40eb#readContract

Thanks! Very useful.

The token_uri is now showing for 24. But ā€¦ its not yet for 25 for example.

Is this never going to be 100% reliable? Itā€™s extremely important for my app, so should I be looking elsewhere for my API needs do you think?

we plan to make an endpoint to resync metadata for an entire contract, we could fix it for this contract in particular or you can use metadata resync endpoint with uri parameter for all the token ids and it should work

Thanks. Do you think itā€™s likely do de-sync again?

I donā€™t expect it for the metadata to be removed after it was added once