Third party API - Web app

Hi!
I want to create a web app for a third party service.
The service is a loyalty program, so what I want to do is create a login/register page for users, where they can input their username and password and see their history, data, number of points, etc, and also redeem prizes online, or create a new account if they don’t have one. The web app access would be just for the clients, not the backend and admin areas.

So I think what I’d have to do is connect form fields with the 3rd party API using the wix-fetch API, and then create a page where the user’s information is displayed, and I would have to create a backend module to run this so my API key stays hidden, but… I’m not sure how to do this. Is it possible?
Thanks!

Hey

  1. YOu can use WIX Fetch to fetch data from any resource on the web.

  2. All code you put in backend folder stays hidden so any keys would go in that folder.

  3. If you populate records and store in your collections you can display them for users.

One more thing, everything is almost possible it just requires more or less coding and some special hacks along the way. The only we really miss is the ability to post data into WIX but it will come.

Thanks Andreas!
One thing, the user data needs to come from the third party API, not from a collection, since it is variable. So the info areas in the page would need to change based on what it fetches from the API, how would I do this?

I would create some variables in code and then populate thoose variables using fetch inside a backend serviceModule.jsw file in separate functions. Then I would import thoose functions into the page code and call the functions and alter the areas on the page. But if you could store in collections as some kind of cache it will be simpified because you can connect WIX elements to your collections.