OpenSea plugin API Error 403: Unauthorized when using mainnet

I did everything according to this tutorial: https://www.youtube.com/watch?v=r2YFhfjIb3k

Everything works fine on the testnet. On the main network, it gives an error:

Uncaught (in promise) Error: Something went wrong
{ “code”: 500001,
“message”: “No asset found”,
“details”: { “method”: “getAsset”, “network”: “main”, “tokenAddress”: “0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D”, “tokenId”: “3650”, “error”: "API Error 403: Unauthorized. Full message was …

I changed the “appId” and “serverUrl” in the settings, and also changed “testnet” to “mainnet” in the App.js file Plus, I changed the contract address of the token and its ID (token in the main network)

The application starts. But here, the buttons do not work - they give the error above. The Moralis admin panel shows that there is a connection to the application.

I searched for information on the forum but did not find a solution.

It seems to me that the connection to the opensea API is not working.

For it to work, you need to switch to a PRO plan or am I mistaken?

Can you help me please?
Thanks.

Hello. I purchased the PRO plan hoping to get help with my problem.

This message has been unanswered for over 24 hours.

Can someone tell me how long to wait for an answer? How do I know if someone is working on my issue?

what is the code that you run when you get that error?

1 Like

I’m not sure I understood the question correctly. I’ll try to answer the best I can.

I did everything exactly as described in this instruction: https://moralis.io/opensea-api-alternative-list-nfts-with-this-opensea-plugin/

Everything worked fine on the test network. I tested the functionality and was pleased with the result.

I decided to switch to the main network and changed the settings for the main network:

This error appears when clicking on the “Get Asset” and “Get Asset” buttons

When I clicked on the “Create Sell Order” button, this error appears:

MoralisWeb3.js:931 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'triggers')

**I repeated all the steps from the tutorial a few more times to make sure that I understood everything correctly and did not miss anything anywhere.

The result was the same every time. Everything works on the testnet. The main one is an error.**

do you have latest version of opensea plugin? can you look in your browser console/network tab to see what is the request that you make when it doesn’t work?


Plugin version 0.087

Regarding the “request”, I’m not sure that I correctly understood what exactly needs to be shown.

I did as I understood and attached screenshots

This is the result when I click the “Create Sell Order” button

you can also click on payload tab there

Sell order

Get order

it looks like it uses an oder version of Moralis SDK, 0.0.104, you could try with 0.0.184, also you could paste as text that payload

How can I do that? Can you explain me?

{network: "mainnet", tokenAddress: "0xA905736754e8Caf16020849b370bA056d372e6Cb", tokenId: "926",…}
endAmount: 0.5
expirationTime: 1642716466
network: "mainnet"
startAmount: 1
tokenAddress: "0xA905736754e8Caf16020849b370bA056d372e6Cb"
tokenId: "926"
tokenType: "ERC721"
userAddress: "0xc092d93795ed6610ecfa9d454d534af3e029375b"
_ApplicationId: "wYSxHFNeSKgj9hUDnBCQJ5dg5XR0xZpIsFG0Vl2w"
_ClientVersion: "js0.0.104"
_InstallationId: "96ca8672-4b18-4c6c-9209-e8805e92210b"
_SessionToken: "r:cb5a1d0c177a0ed8725b28a08751bb11"
{network: "mainnet", tokenAddress: "0xA905736754e8Caf16020849b370bA056d372e6Cb", tokenId: "926",…}
network: "mainnet"
tokenAddress: "0xA905736754e8Caf16020849b370bA056d372e6Cb"
tokenId: "926"
_ApplicationId: "wYSxHFNeSKgj9hUDnBCQJ5dg5XR0xZpIsFG0Vl2w"
_ClientVersion: "js0.0.104"
_InstallationId: "96ca8672-4b18-4c6c-9209-e8805e92210b"
_SessionToken: "r:cb5a1d0c177a0ed8725b28a08751bb11"

usually there is a line like this that you add in your html file:

<script src="https://unpkg.com/[email protected]/dist/moralis.js"></script>

you can also try to update opensea plugin in case that it is not the latest version

How can I do that with .js file? Sorry for this question. I am not programmer. I tried to find solution in google, but I did’t understand how do that.
Screenshot 2022-01-21 at 00.36.03

This is using React so you can just update it by yarn add [email protected]

1 Like

Thank you for your reply.

I ran the command you wrote. But the error did not disappear, but a message appeared stating (yellow) that I am not using the latest version of the SDK.

I repeated the command with a recommended version number:

yarn add [email protected]

After that, all yellow messages disappeared.

But with the buttons, the red errors remained.

Create Sell Order


Playload

{network: "mainnet", tokenAddress: "0xA905736754e8Caf16020849b370bA056d372e6Cb", tokenId: "926",…}
endAmount: 0.5
expirationTime: 1642748647
network: "mainnet"
startAmount: 1
tokenAddress: "0xA905736754e8Caf16020849b370bA056d372e6Cb"
tokenId: "926"
tokenType: "ERC721"
userAddress: "0xc092d93795ed6610ecfa9d454d534af3e029375b"
_ApplicationId: "wYSxHFNeSKgj9hUDnBCQJ5dg5XR0xZpIsFG0Vl2w"
_ClientVersion: "js1.0.7"
_InstallationId: "96ca8672-4b18-4c6c-9209-e8805e92210b"
_SessionToken: "r:f3093fd0259dd590f5c82d8cf1fe15bc"

Get Asset and Get Order same error


Playload:

{network: "mainnet", tokenAddress: "0xA905736754e8Caf16020849b370bA056d372e6Cb", tokenId: "926",…}
network: "mainnet"
tokenAddress: "0xA905736754e8Caf16020849b370bA056d372e6Cb"
tokenId: "926"
_ApplicationId: "wYSxHFNeSKgj9hUDnBCQJ5dg5XR0xZpIsFG0Vl2w"
_ClientVersion: "js1.0.7"
_InstallationId: "96ca8672-4b18-4c6c-9209-e8805e92210b"
_SessionToken: "r:f3093fd0259dd590f5c82d8cf1fe15bc"

I also checked the version of the OpenSea plugin.

In the admin panel, version 0.0.83. Same as on the plugin page: https://moralis.io/plugins/opensea/

it looks like I get same error, it seems to be a restriction from OpenSea

What can I do with this? How to fix it?

Hey @Den

This is not something you can fix yourself since the error comes directly from OpenSea.
We just contacted them asking to investigate.

Fingers crossed, let’s see what they say.

1 Like

Any news on this issue?