Hi everyone, I’m having trouble creating a simple app to run in my website because it seems I need to use OAuth but somehow can’t seem to be able to make it run. The details are below.
My website will have a heavy use of collections, so I decided to create a custom backup system to have more than the weekly automatic backup. My goal is to have one or maybe two backups per day.
I stumbled upon the Wix Backup API so I made use of it to manualy trigger backups. I have not been able to run the scheduled backups, but I did succeed in triggering a backup manually with a custom action (visiting the home page, in my example).
For this, I had to create a Test Token (in the “Try It Out” button in the above page), and that served its purpose. However, I believe that because it is a test token, it should have a short expiration date, so it stops working after a short period of time.
The other option that shows in the “Try It Out” button is to provide an Access Token, which seems to be received when setting up OAuth, which is used by Wix Apps.
So I went to the Apps section and created a new App. I’m using Wix Editor, but it seems the Apps can only be developed in Wix Studio Editor, so I did it there. I stored the code there, released the app, and installed it in my website (which is something kind of weird for me, because I don’t need any GUI - is it possible to make an App without GUI?)
Still, when using the Create Access Token API to generate a new token, I keep getting errors in my Logs, which say the following:
“OAuth token request failed: 400 - {“message”:“Field validation failed”,“details”:{“validationError”:{“fieldViolations”:[{“field”:“getBy.app”,“description”:“is invalid”}]}}}”
If I’m saying something wrong please correct me… There is definitely some problem in my workflow, but I have tried so many things that I got kind of confused by now… It should be fairly simple…
If anyone knows how to solve this, please do point me in the right direction!
Thanks in advance!
