getAllTokenIds return nft with hidden json

Hi ,Please Help when i run this api

 let NFTs = await Moralis.Web3API.token.getAllTokenIds({
            address: project.contract_address,
            chain: "eth",
            limit: 100,

everthing wroks it return 100 NFT with metadata but sometimes return nft with metadata UNREVEALED and token_uri with hidden json like the example below

    token_address: '0x527fed0373a22a2f288d3fd4f9264178386285f4',
    token_id: '1712',
    amount: '1',
    token_hash: 'ffaadda95ece33f02398db0f6d4d3a83',
    block_number_minted: '14065761',
    contract_type: 'ERC721',
    name: 'Lucky Foo Dogs',
    symbol: 'LFD',
    token_uri: '',
    metadata: '{\n' +
      '  "name": "UNREVEALED",\n' +
      '  "description": "Lucky Foo Dogs! Carry them in your wallet for good fortune. But Foo Dogs do more than bring prosperity... loyal adopters will be rewarded soon.",\n' +
      '  "image": "ipfs://QmbGvvTJhf6oP5tnVWnxSi3R6LeMvhQAGcCD2kmuemMu6L/unrevealed.png"\n' +
    synced_at: '2022-01-24T02:58:38.823Z',
    last_token_uri_sync: null,
    last_metadata_sync: null

this looks like it is a case where the metadata is not yet synced.
in this particular case, after you make that request, it should automatically add to a queue to resync the metadata for all those token_ids that you accessed.

you can also use resyncMetadata if you want a faster sync for metadata, you have to use uri flag

1 Like

Thanks for your help ,Please May u tell me how much time they can resync the metadata for all token_ids

I don’t know exactly, it can vary based on the queue. I would expect it to be less than a day now.

1 Like

okey , thanks for your help