Unable to read or update Live Database via Http Functions

Hi,

I created a database in Wix.com and set all permissions the the database to “Anyone” so that any body can access.
I then developed the Wix webpage to access the database. The webpage i developed and published can read and update information to “live” database as per normal.

However, when I created the Backend code to expose API (I followed the below link for the code) and called the API from a client to access the Wix database, it only access the “Sandbox” database, instead of “Live” database. I set the database all permissions to “Anyone” and published the Web but still unable to read or update information to “Live” database through the Backend API.

Any advice on anything i might missed up to access “Live” database via backend exposed API would be much appreciated. Thanks.

Hi,
It sound like you are using the wrong URL, like in the description when you are testing the HTTP function you need to use this pattern :

https://{user_name}.wixsite.com/{site_name}/_functions-dev/<functionName>

But in order to access the live site use:

https://{user_name}.wixsite.com/{site_name}/_functions/<functionName>

Let me know of it worked,
Good luck :slight_smile:

HI,
It works!! Thank you very much for your great help.

After solving the above issue, can i consult you on the other two as stated below?

  1. Is it possible to have any code in the Wix page to automatically reload the information on the web page from live data collection when the data collection is updated by other client?
  2. I have a web page as UI to display and manually edit the information from live data collection and have backend APIs to update the same live data collection by other clients. Sometimes I noticed that i need to close the Wix webpage in order for other client to update the data collection via backend APIs. Is there any workaround to update the data collection via backend API without the need to close the webpage?

Hi, i also have the same question, can any1 answer please?

  1. Is it possible to have any code in the Wix page to automatically reload the information on the web page from live data collection when the data collection is updated by other client?
  2. I have a web page as UI to display and manually edit the information from live data collection and have backend APIs to update the same live data collection by other clients. Sometimes I noticed that i need to close the Wix webpage in order for other client to update the data collection via backend APIs. Is there any workaround to update the data collection via backend API without the need to close the webpage?