opensea-js icon indicating copy to clipboard operation
opensea-js copied to clipboard

Invalid JSON RPC response: "project id required in the url\n"

Open koinfox opened this issue 4 years ago • 3 comments

I am calling createBuyOrder method of the opensea sdk But it gives me the error

Invalid JSON RPC response: "project id required in the url\n"

const txnHash = await this.seaport_Client.createBuyOrder({ asset: { tokenId, tokenAddress, schemaName }, accountAddress, // Value of the offer, in units of the payment token (or wrapped ETH if none is specified): startAmount: startAmount, }); I am working on the testnet.

Also in between I get 429 http code for some requests

How can I get the project Id for testnet environment?

koinfox avatar Jun 13 '22 11:06 koinfox

@koinfox did you have a chance to read the docs and Getting Started

NOTE: Using the sample Infura provider above won't let you authorize transactions, which are needed when approving and trading assets and currency. To make transactions, you need a provider with a private key or mnemonic set.

In a browser with web3 or an extension like MetaMask or Dapper, you can use window.ethereum (or window.web3.currentProvider for legacy mobile web3 browsers) to access the native provider. In a Node.js script, you can follow this example to use a custom mnemonic.

itsthedoom avatar Jun 13 '22 22:06 itsthedoom

Hi @itsthedoom

Thanks for the quick response with details. Let me try the solution.

koinfox avatar Jun 14 '22 04:06 koinfox

Closing this issue as resolved. If you are still running into issues please let us know. I also recommend joining our Discord where active members of the community are online and can help troubleshoot in realtime https://discord.gg/opensea

itsthedoom avatar Jun 17 '22 07:06 itsthedoom