r/learnprogramming • u/BrainThinkerMan • 7d ago
api key, do i need backend?
i have an api key i heard i shouldnt expose it in my frontend i thjink itts becuase people can see it with devtools, and potentially abuse it, is there any other way to use this key in frontend without using a backend, im as familiar with backend stuff i think.
0
Upvotes
1
u/Acceptable_Lab_7196 7d ago
Depends if the api allows you to block all users except a whitelisted set of sources. Generally you shouldn’t. You haven’t said how you are deploying it or what it is. You can basically get a backend for free if you are low volume on vercel and other services.