alvis / gatsby-source-notion

A Gatsby source plugin for content management with Notion using the official API.
MIT License
56 stars 6 forks source link

S3 Images return 403 #8

Closed mitchmalone closed 2 years ago

mitchmalone commented 2 years ago

I suspect I am perhaps doing something wrong here, but when I include Cover images from S3 I get a bunch of 403 console errors.

You can view my WIP here for an example of what's happennig.

mitchmalone commented 2 years ago

Note: This seems to work occasionally after a rebuild and then stops. Not sure what this might mean.

alvis commented 2 years ago

Hi @mitchmalone. I believe the 403 response is caused by your image being hosted by Notion rather than somewhere else. It's a limitation of Notion API that if you upload an image on Notion, the returned link via Notion API is only valid for 1 hour.

The only workaround is to use an externally hosted image as your cover image. You can use other public hosting like Dropbox and set your cover image by the public URL on Notion.