Hello!
Currently working on a project in the Studio API which allows students to visualize calculus graphs utilizing AR. The flow is as follows:
- Students input their desired functions on a website separate from 8th Wall
- After submitting the functions, a unique URL to the 8th Wall project is generated using the UUID library.
- The functions should somehow be POSTed to this unique URL, and the project parses the functions from there.
Obviously, my struggle is with step 3. I am out of practice with REST API so I may be missing something obvious. As a note, the input website uses React framework, and I was attempting POST requests with Axios. However, these received 403 errors, and I’m not sure how 8th Wall would have parsed them anyways.
I know there are sample projects dealing with backend APIs, but to be honest I find the 8th Wall documentation quite confusing and sporadic. If you have specific links to point me towards, please do!
Thanks in advance!
Hi, welcome to the forum!
You might consider not using a POST at all and instead redirecting them to an 8th Wall experience that uses URL parameters to determine the content they see. Then you can encode whatever data you want to be in the URL.
Thank you for the response! This is what we were previously using, but users run the risk of exceeding URL character limits due to the input of multiple functions.
Hmm, you might have to create some intermediate server that stores the data and has a direct URL to the data. Have you tested the length of the URL and run into issues? As far as I know HTTP doesn’t have a character limit however some browsers might.
While I have not yet run into issues, the LaTeX formatting of the equations + unpredictability of what students or professors may want to demonstrate raises some issues. Are there any docs you could guide me to for setting up an intermediate server and interfacing it with 8th Wall? 
There aren’t any official docs for this specific use case, since it’s more about how you architect your solution than something unique to 8th Wall itself.
8th Wall experiences are fundamentally client-side web pages, so they can’t directly listen for incoming POST requests. Instead, I’d recommend setting up an intermediate server that handles the POST requests. That server can then return a URL pointing to your 8th Wall experience. From there, the client-side script can redirect to that URL.
This approach gives you full control over how the URL is constructed and allows for two-way communication between the intermediate server and the client using standard HTTP requests.