NFT tokens missing token_uri and metadata

Hi, I am using Moraling APIS to get the NFTs associated to an account and grabbing the token_uri and the metadata. For some reasons las week I was able to get all the info associated with it, but right now those fields are coming empty. Any ideas ??

Hi,
You could try to update your Moralis server, and the Moralis SDK.
If still not working after that then you can paste the code and the account address.

hello @cryptokid thank you for your response… I am using CURL for now,
please check this API request… I have two NFTs there, I can get everything from one but for the another I am not getting anymore the metadata and token_uri

curl -X ‘GET’
https://deep-index.moralis.io/api/v2/0xB29127579502d731cE1F03C617f97BB5fEdcAbf8/nft?chain=eth&format=decimal&order=name.DESC
-H ‘accept: application/json’
-H ‘X-API-Key: xxxxxxxxxxxxxxxxxxxxxxxxxx’

Just confirming what I get:

{
  "total": 2,
  "page": 0,
  "page_size": 500,
  "result": [
    {
      "token_address": "0x495f947276749ce646f68ac8c248420045cb7b5e",
      "token_id": "66310882261537555691602703650062140481343198832089747038674291021025984380929",
      "amount": "1",
      "owner_of": "0xb29127579502d731ce1f03c617f97bb5fedcabf8",
      "block_number": "13054104",
      "block_number_minted": "13054104",
      "contract_type": "ERC1155",
      "token_uri": "https://api.opensea.io/api/v1/metadata/0x495f947276749Ce646f68AC8c248420045cb7b5e/66310882261537555691602703650062140481343198832089747038674291021025984380929",
      "metadata": "{\"name\":\"3BX\",\"description\":\"3BX\",\"external_link\":null,\"image\":\"https://lh3.googleusercontent.com/rUylC1Qr28fA1PDUvyz_GmSOPdpjZDcx3Npd3A5_zdha3STgssDLy6Cxh0Bj4JFGVTHfkWrLfkWqiBTsCAYrSfaQc5kl3dq9JwUopw\",\"animation_url\":null}",
      "synced_at": "2021-08-19T06:34:48.765Z",
      "name": "OpenSea Shared Storefront",
      "symbol": "OPENSTORE"
    },
    {
      "token_address": "0xf07468ead8cf26c752c676e43c814fee9c8cf402",
      "token_id": "1466",
      "amount": "1",
      "owner_of": "0xb29127579502d731ce1f03c617f97bb5fedcabf8",
      "block_number": "13054536",
      "block_number_minted": "12750966",
      "contract_type": "ERC721",
      "token_uri": null,
      "metadata": null,
      "synced_at": null,
      "name": "CryptoPhunksV2",
      "symbol": "PHUNK"
    }
  ]
}

It looks like a way to get the token_uri is to use the contract from https://etherscan.io/token/0xf07468ead8cf26c752c676e43c814fee9c8cf402?a=1466#readContract

and to call tokenURI function and it will result
tokenURI(uint256) method Response ] string : https://gateway.pinata.cloud/ipfs/QmQcoXyYKokyBHzN3yxDYgPP25cmZkm5Gqp5bzZsTDF7cd/1466

Hey Cryptokid, I’m having some issues trying to get the proper token_uri as well of my minted item.

Could you share with me what you did?

I think that I called that function directly on etherscan interface that time, but it is possible to do it from your code too with web3.