question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CORS error after invoking getOrder SDK method

See original GitHub issue

Hello!

I issued with this when I try to invoke getOrder SDK method

Access to fetch at 'https://api.opensea.io/wyvern/v1/orders/?asset_contract_address=0x07bbdaf30e89ea3ecf6cadc80d6e7c4b0843c729&limit=1&side=1&token_id=63' from origin 'https://opensea.io' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Does someone have the similar issue and/or it’s fix?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
Verrokcommented, Feb 16, 2022

Have you tried to set X-API-KEY in headers?

Forgot to close this issue. Sending requests with API keys works propeply

0reactions
Verrokcommented, Mar 3, 2022

@sayhicoelho @Verrok - how do we set the X-API-KEY if i’m calling directly using the SDK?

const orderResponse: Order = await seaport.api.getOrder({
  side: OrderSide.Sell,
  asset_contract_address: tokenAddress,
  token_id: tokenId,
});

You need to specify apikey while you creating OpenSeaPort instance, e.g.

const seaport = new OpenSeaPort(window.ethereum, {
    networkName: "main",
    apiKey: "<your key>"
  })
Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot CORS errors from API Gateway - AWS
I get the error "No 'Access-Control-Allow-Origin' header is present on the requested resource" when I try to invoke my Amazon API Gateway ...
Read more >
eBay Trading API CORS issue - Stack Overflow
I am trying to make a GetOrders call on eBay Trading API, and am getting CORS error: XMLHttpRequest cannot load https://api.ebay.com/ws/api.dll. No 'Access- ......
Read more >
CORS errors and how to solve them - Topcoder
The first method is the quickest, but it is not the right way. It is mostly used during development when you need to...
Read more >
What Is a CORS Error and How to Fix It (3 Ways) - Bannerbear
A CORS error is common when making an HTTP request to another origin. You can get rid of it using one of the...
Read more >
3 Ways to Fix the CORS Error — and How the Access-Control ...
Fix one: install the Allow-Control-Allow-Origin plugin. The quickest fix you can make is to install the moesif CORS extension .
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found