js
js copied to clipboard
metaplex.nfts().findAllByOwner() error
const connection = new Connection(clusterApiUrl("mainnet-beta"));
const metaplex = new Metaplex(connection, { cluster: 'mainnet-beta' });
const ownerAddress = new PublicKey("C3HC8DrAoQqiWdCvo4u4nJATfmsHxwg3cZx18cUm9wuH");
const nft = await metaplex.nfts().findAllByOwner({ owner: ownerAddress }).run();
console.log(nft)
[Error: 410 undefined: {"jsonrpc":"2.0","error":{"code": 410, "message":"The RPC call or parameters have been disabled."}, "id": "9b1b48e1-559d-42e8-aa0a-aa6402f27ab8" } ]
Looks like you are using an RPC that doesn't support this call for whatever reason. Try using a different RPC server II usually use the free tier on https://syndica.io and haven't had any issues :)