viewtopic.php?t=25499
The problem is the authentication method has changed in >= 1.3.4.0
I've figured out that someone would need to get the auth API token in order to authenticate and then curl the runstate.json API change link with the token affixed to the end. I figured out how to do it with bash as the following...
Code: Select all
curl -XGET http://localhost/zm/api/states/change/Home.json?token="$(curl -XPOST -d "user=user&pass=pass" http://localhost/zm/api/host/login.json | sed 's/{//g' | sed "s/\"access_token\"\:\"//g" | cut -b 1-195)"
I don't know any PHP and so was wondering if someone wanted to use this information to modify the PHP script in order to authenticate and change the runstate via API. I feel like it's probably pretty elementary to get the access token and then curl with it as suggested, but I figured I'd ask and see if someone can help me out before I end up learning PHP and doing it myself.