Really thanks for your reply~
How can I define an environment variable in 8th Wall? When I use the syntax βprocess.env.OPENAI_API_KEY,β it throws an error. Also, does 8th Wall support .env files and Node.js? Thank you!
By the way, this is my system flowchart, do I need a extra web hosting server between 8th wall and AI platform?
That looks correct to me, you shouldnβt need any extra web hosting beyond whatever is hosting the Database.
Thank you very much for your previous reply. Iβd like to further clarify a few issues Iβm experiencing during backend development.
1. process.env
not recognized β is Node.js supported?
I have disabled Edit Mode in my Modules, and correctly set my API Key as an Environment Variable. According to your documentation under:
Environment Variables β Access Environment Variable in Code β Example:
const API_KEY = process.env.api_key;
However, when I run this in a backend module (e.g., index.ts
), I receive the following error:
Cannot find name 'process'. Do you need to install type definitions for node?
Try `npm i --save-dev @types/node`.
This message appears to be related to Node.js, which makes me wonder:
Does the 8th Wall backend support Node.js-based syntax (
process.env
) at all?
Or is it only partially supported through some internal mechanism?
2. Repeated 403 Server Error
from OpenAI API
Even after setting up the fetch request properly, and successfully encoding image data using base64, I keep encountering:
Server error: 403 (Forbidden)
I suspect this may mean the OpenAI server received my request but refused to authorize it.
Does this imply that my
Authorization
header is being stripped or not properly sent by 8th Wallβs backend?
Or could it be due to wrong API format or model support (e.g., using GPT-4o-mini for image analysis)?
Thanks again for your patience and your help. Iβd appreciate any clarification or suggestions you could offer on these two issues.