Skip to content
Discussion options

You must be logged in to vote

the first thing i'd rule out is where the requests come from. secret keys are blocked for browsers: Supabase matches on the User-Agent header and returns 401 (API keys docs). if the REST and Auth tests ran from a browser console, from a REST client that sends a browser user agent, or from code that runs in the browser, that alone gives you a 401 with an empty body

quick check from a terminal, with the key only on apikey:

curl -i "https://<project-ref>.supabase.co/rest/v1/articles?select=id&limit=1" \
  -H "apikey: sb_secret_..."

also keep the new keys off Authorization: Bearer. they aren't JWTs, and the docs say to send them on apikey (see "Known limitations" on the same page)

if plain cu…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@oyakubu11-cell
Comment options

Answer selected by oyakubu11-cell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants