[▲ Vercel Community](/) · [Categories](/categories) · [Latest](/latest) · [Top](/top) · [Live](/live) [Help](/c/help/9) # React and Env Variables when using Vercel KV 369 views · 1 like · 2 posts Iaaaaan96 (@iaaaaan96) · 2024-07-29 I am using react as the framework, also using Vercel KV to retrieve some values from session storage. React only allows you to use the env variables as **"REACT_APP_"** prefix. When doing this for **REACT_APP_KV_REST_API_URL and REACT_APP_KV_REST_API_TOKEN,** it returns an error **"Error: @vercel/kv: Missing required environment variables KV_REST_API_URL and KV_REST_API_TOKEN"** I am guessing that it is expecting the value as KV_REST_API_URL and KV_REST_API_TOKEN, has someone encoutered this issue? Amy Egan (@amyegan) · 2024-07-29 · ♥ 1 Hey @iaaaaan96! Prefixed environment variables are not provided by default to help protect your database. You should generally avoid exposing database credentials in client-side code. I would recommend using `@vercel/kv` in a serverless function. Then you can fetch data from the serverless function in your client-side code. https://vercel.com/docs/storage/vercel-kv/quickstart