Solana API NFT Metadata Error

I am trying to get the metadata for a Solana NFT but I am getting Error: Bad Request.
image
There was a submission about the same problem on the moralis forums:

But there was no answer to the solution.
I am also getting an error on the moralis website where you can test the endpoints so Im pretty sure this is something on moralis’s end.

Hi @bob, Check the server if it is not sleep. Sometimes it happens.

Its not asleep. All my other calls are working.

Hi @bob
Is this error happening when looking for all the NFT’s or only for few NFT’s?

this is the call:


it is for one NFT.

Link to call on docs: https://docs.moralis.io/moralis-dapp/solana-sdk/nft

This particular error happens only for few NFT addresses. I guess this is because NFT data is not yet updated or available at Moralis (Not 100% sure).

Example 1: This is for NFT address 6XU36wCxWobLx5Rtsb58kmgAJKVYmMVqy4SHXxENAyAe, but I do not see the NFT on solana explorer and the same return error when used in getNFTMetadata() function.

Example 2: This of another NFT address CvX56PcSszVpYHR5JQ6ojujZvJvdBJETc3qcrCyPhX9m, whose NFT data is visible in solana explorer and the same is also available with moralis getNFTMetadata() function.

I do not see any particular solution for this at this point.

Thanks so much for your help! The problem was a mix of me not knowing the difference between the mint address and the associatedTokenAddress as well as trying to use mint addresses from devnet NFTs but calling it on mainnet. Thanks again for helping me fix this, I really appreciate it! :heart: :heart: :heart:

1 Like