Before building our front-end application, we need to get the API credentials from our Supabase dashboard so that we can connect from the front end.
Finding Your Project Settings
- Go to Project Settings: In the left menu, click on “Project Settings” at the bottom.
- Select API Keys: We need the
anon/publickey from the Legacy API Keys tab. - Select Data API: We need the Project URL.
Important: The anon key is safe to use in frontend code because it only allows operations that pass the Row-Level Security policies. Never share the service_role secret or use it in the front-end. If you accidentally use this in the front end or commit it to a repo, you need to generate a new one immediately.