bkrem / react-nft-gallery

:framed_picture: React component to display your NFTs as a gallery

Home Page:https://bkrem.github.io/react-nft-gallery

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OpenSea Fetch Assets URL gives an error

bornegui opened this issue · comments

The URL you're using gives a 401 error.
Currently you're using:
https://api.opensea.io/api/v1/assets?limit=50&offset=${offset}${ owner ? '&owner=' + owner : '' }
If you remove the limit and offset parameters and you just leave the owner parameter it works fine.

Hi @bornegui,

Thanks for reporting this. Unfortunately this isn't the first time there's been silent breakage on the /v1/ OpenSea endpoints. This time it's somewhat more inconvenient, since they seem to have added an API key requirement for any non-trivial requests (i.e. any query parameters beyond owner=).

I've published a fix as v0.6.2 which takes this into account, see the release notes and/or the "OpenSea API key" section in the readme for more info: https://github.com/bkrem/react-nft-gallery/releases/tag/v0.6.2

Hi @bkrem,

Thanks very much for fixing this quickly, it works fine now!!

I wanted to trigger a treatment when the user clicks on any image, is it possible to somehow specify an onClick event for that?
I'd need the image's url for my treatment.