Thanks a lot. I got this working really quickly. Any issues with "restarts" using this?
I need to authenticate on the server side as an admin to be able to sync (POST) data to the ACS custom objects. Have any of you done this or have any guidance on how to approach?
To clarify, the flow is like the following:
Start Server
Start Cron to sync at regular intervals
Authenticate to ACS (login)
Post to ACS (fail) 401
It seems the authentication is not getting recorded or session information saved so that subsequent post requests can be made
I have tried multiple ways:
Using Restler: This authenticates and I get a 200 code back:
rest.post('https://api.cloud.appcelerator.com/v1/users/login.json?key=<myappkey>&login=myemail&password=mypassword', {
// other stuff here
})
But on complete of this, no other posts that require login work. It's like I never logged in.