What is an API key?
An API key is a long code that tells a service your app is allowed to use it. Many keys are secret, so treat them like passwords and keep them out of shared code.
An example
To add maps, you sign up with a map service and get a key. You store it in an environment variable so it never ends up in your public GitHub repository.
Where you’ll meet it
- Get an honest review · Build a web app
- Save and load data in your app · Save data with Supabase
- Add sign-up and sign-in pages · Add sign-in with Supabase
- Turn on Google sign-in · Add sign-in with Supabase
- Save and load data in your app · Save data with Firebase
- Add sign-up and sign-in pages · Add sign-in with Firebase
- Add sign-up and sign-in pages · Add sign-in with Clerk
- Create a key and save it in .env · Send emails with Resend
- Create a key and save it in .env · Send emails with SendGrid
- Create a reCAPTCHA key · Stop bots with Google reCAPTCHA
- Make a secret API key for your server · Stop bots with Google reCAPTCHA
- Create a Turnstile widget · Stop bots with Cloudflare Turnstile
- Get your hCaptcha keys · Stop bots with hCaptcha
- Create a key and save it in .env · Add AI features with the Claude API
- Try it and check the cost · Add AI features with the Claude API
- Create a key and save it in .env · Add AI features with the OpenAI API
- Try it and check the cost · Add AI features with the OpenAI API
- Create a key and save it in .env · Add AI features with the Gemini API
- Try it and check the cost · Add AI features with the Gemini API
- Add your secret settings · Put your site online with Vercel
- Add your secret settings · Put your site online with Netlify
- Add your secret settings · Put your site online with Cloudflare
- Save your secret key in .env · Take payments with Stripe
- Add a checkout for one product · Take payments with Stripe
- Save your client-side token in .env · Take payments with Paddle
- Add a checkout for one product · Take payments with Paddle
- Save your access token in .env · Take payments with Polar
- Add a checkout for one product · Take payments with Polar
- Save your API key in .env · Take payments with Dodo Payments
- Add a checkout for one product · Take payments with Dodo Payments
- How does a database work underneath? · Databases
- What’s the fastest way to add sign-in? · Sign-in
- Resend, Amazon SES or SendGrid: which email service fits my product? · Email
- How do the pieces talk to each other? · How the pieces fit
- Do I need to worry about security for my product? · Security
- How does an AI API work underneath? · AI features
- Why does my product work on my computer but not online? · Debugging
Related tools
- Supabase · Give your app a database, user accounts, and a place to store uploaded files such as profile photos.