Api key woking locally but not after deployment


My site name is https://griffwong.netlify.app/

I am using environment variables to hide my api keys. My Email form works locally, but not after deployment. Am I inputting my environment variables in the configuration settings correctly?

For example, if my API key is

VITE_API_Key : “abc”

On Netlify in the configuration settings, I would input API_key as the key and “abc” as the value right? Or should I simply input abc as the value without the quotation marks?

You add a key with the exact value you are using.

You enter the value exactly as you want it. abc !== "abc"

If you are using this in front-end code the key will not remain hidden.

Thanks for the heads up on hiding the API Key. I have inputed my key and values into the configuration settings exactly as it is in my .env file. It works locally but not after deployment. Am I missing something?

Read this support guide

Based on the information you’ve provided I can offer no further advice.