Hey guys, I'm trying to use the REST API

Hey guys, I'm trying to use the REST API for Zaraz since we need to have it work on our Mobile Apps. My question is how do we get it to work when doing local deving? I get a CORS error when trying to hit one our domains and I'm not sure where or how I could fix it. I'm testing on a browser right now and I think that it would fix for the browser once the code is on the same domain. We'll be testing on mobile next but I'm not sure if it would run into the same error.
10 Replies
Mackenly
Mackenly6mo ago
How are you building the app?
Shannor
ShannorOP6mo ago
Right now I'm just building it on my machine. But instead of the mobile app case can we talk about the browser case first. I'm trying to figure out how to send from a local running react app to Zaraz at a domain using the REST API
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
Shannor
ShannorOP6mo ago
Oh. Interesting. I'll share it.
Shannor
ShannorOP6mo ago
Cloudflare Docs
HTTP Events API · Cloudflare Zaraz docs
The Zaraz HTTP Events API allows you to send information to Zaraz from places that cannot run the Web API, such as your server or your mobile app. It …
Shannor
ShannorOP6mo ago
The http endpoints.
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
Shannor
ShannorOP6mo ago
We were building a JS library to work on both mobile and web, so we wanted to use the http api so we wouldn't have two different implementations. Is that not an option?
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
Shannor
ShannorOP6mo ago
Ok. I understand. I'll talk with a few other people and see. Thank you for your time.
Want results from more Discord servers?
Add your server