Same issue here but from a different API. Here is the example:
const options = {
address: "0x9401518f4ebba857baa879d9f76e1cc8b31ed197",
token_id: "1349",
chain,
};
const tokenIdMetadata = await Moralis.Web3API.token.getTokenIdMetadata(
options
);
console.log(tokenIdMetadata);
The response is:
{
token_address: '0x9401518f4ebba857baa879d9f76e1cc8b31ed197',
token_id: '1349',
owner_of: '0x1f861b04aba9d12b7d567bd91ae67ee7b9b2f879',
block_number: '14243279',
block_number_minted: '14176129',
token_hash: '2a837535e80ca1bb328bb4bec2746515',
amount: '1',
contract_type: 'ERC721',
name: 'Weirdo Ghost Gang',
symbol: 'GHOST',
token_uri: 'https://ipfs.moralis.io:2053/ipfs/QmU61BwmB9fm3kN4EWS14YxrB1FFJcMWj9GRrf4hsEvaYE/1349',
metadata: `{"name":"Lil Ghost#1349","description":"Weirdo Ghost Genesis is Sleepy's graffiti work, purely hand-drawn, not generated. All the little ghosts came from my dreams, and I was trying to draw the people from my dreams since I was a child.","image":"https://ipfs.io/ipfs/Qmdw2EFVqrKM9rjtRi2yxJT9gFYkmKpEUooiLheVSoXfmK","attributes":"Unpublished"}`,
synced_at: '2022-02-10T04:13:55.378Z',
last_token_uri_sync: null,
last_metadata_sync: null
}
The corresponding metadata from token_uri
is
{"name":"Lil Ghost#1349","description":"We are the ghost, your nightmare, your daydream.","image":"https://ipfs.io/ipfs/QmdursSMNaAhQTYJAqWvKdMWM2BCvfYYfRyTnynJu2YFp5","attributes":[{"trait_type":"bg","value":"Wild Watermelon"},{"trait_type":"body","value":"Spirit"},{"trait_type":"clothes","value":"Blue Pajamas"},{"trait_type":"head","value":"Angel Halo"},{"trait_type":"eye","value":"Violet Round"},{"trait_type":"mouth","value":"Mouth 6"}]}
which is different from the metadata fetched.