GetNFTs APIs, the metadata of NFT in the return value is null while the token_url is normal

Dear Expert,

I just bought your API services, when I called the GetNFTs interface, I found a issue that the metadata of NFT in the return value is null while the token_url is normal.

Attached below:

curl -X ‘GET’
https://deep-index.moralis.io/api/v2/0x0faa1cD8659d50B9547b3b9428701989E5a87566/nft?chain=ftm&format=decimal
-H ‘accept: application/json’
-H ‘X-API-Key: gDQrSHH4fyDJC8ZblncLuQLQTQlWuj4donQfyVWUnJEiLHK9dQrmT3l84o81Auxf’

However,when I see it in block browser:https://ftmscan.com/token/0x94e22c14118353651636f9af43cd0a5a08b93da3#readContract, the token-url seems normal: https://api.airnfts.com/v1/nfts/lake_and_snow_1658319482494

So, I am now confused with the issue why GetNFTs interface can not return the metadata and token_url, pls help me to find the root cause.

Try resyncing the token_uri for this tokenId.

Hi, I did not found the token_id in curl,since token_id is required

curl -X ‘GET’
https://deep-index.moralis.io/api/v2/nft/0x0faa1cD8659d50B9547b3b9428701989E5a87566/sync?chain=ftm
-H ‘accept: application/json’
-H ‘X-API-Key: gDQrSHH4fyDJC8ZblncLuQLQTQlWuj4donQfyVWUnJEiLHK9dQrmT3l84o81Auxf’

so how to transfer the params of token_id? @glad

How to call this api correctly while using the curl method?

I try this method : curl -X ‘PUT’
https://deep-index.moralis.io/api/v2/nft/0x94e22C14118353651636f9aF43cD0A5A08B93dA3/sync?chain=ftm
-H ‘accept: /
-H 'X-API-Key: *******

,

but the metadata and token_uri of GEtNFTs are still null.

Need help

In your case you need to resync the tokenuri first and then resync the metadata.
To sync the token uri you need to include flag=uri in the URL. The default flag value of the request is to resync metadata.

 'https://deep-index.moralis.io/api/v2/nft/ContractAddress/NftId/metadata/resync?chain=eth&flag=uri&mode=async'

You can also test the parameters here https://admin.moralis.io/web3apis