© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•2y ago•
49 replies
Jon3

Create Unique API Key For Users

Hi guys - quick question... I have have a next.js app deployed to vercel, all using SSR and auth with supabase. I am now adding in an API to that app. Thus, in doing this, I'd like to have users have their own individual API (like any other api youve used likely 🙂 and give the user the ability from my front end, to see their api and roll the key when needed. When I receive an API request for the serverless function, in that header i'll have to take this API key they have inputted and somehow use this to find the user i nthe users table with that API key... SO my question is this > I could just do this by adding an "api key" column (or secret and private key) type scenario to my users table right lol? I am just wondering if there is another best practice, or a common way to do this with supabase in terms of authenticating an "actual" key as opposed to just "matching on on file" with the user as a form of "auth".... thanks!
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

supabase.auth.api.createUser duplicate key value violates unique constraint users_pkey
SupabaseSSupabase / help-and-questions
4y ago
Create projects for users?
SupabaseSSupabase / help-and-questions
4y ago
API KEY "ANON_KEY " for REPLIT
SupabaseSSupabase / help-and-questions
2mo ago
Create API keys error....for new TWT Signing key setup
SupabaseSSupabase / help-and-questions
7mo ago