Hey all, pretty new to supabase. I've made a scraper which adds info into a database, and now I would like for browsers to read this data. I havent yet set RLS, I want browsers to be able to read but not write (easy enough theres a template for that) but how would I allow my scraper function to access the database for insert?
Jim
02/08/2022, 5:47 PM
I've only been able to find authentication for real users, not bots
s
Scott P
02/08/2022, 5:48 PM
If your scraper is running on a server, or another environment where users don't have access to the keys, you can use the service key to bypass RLS policies to write the data
j
Jim
02/08/2022, 5:48 PM
Nice one! Thanks I'll have a look into 'service keys'
s
Scott P
02/08/2022, 5:50 PM
No worries 🙂
It's the same process for accessing the database - the only thing that changes is that you use the service key from your dashboard, instead of the public key