Authenticating to the API

Help for Z-Command related issues only
Post Reply
Posts: 1
Joined: Mon Apr 13, 2015 9:06 pm

Authenticating to the API

Post by photinus » Mon Apr 13, 2015 9:09 pm

How can I go about authenticating for the API? I see the getToken call, but there is no documentation about what kind of information to pass into the call to authenticate.

Unrelated, Is there a way to trigger an update? I saw on the whats-new section that version 6151 was out, but I'm on 6149 and it's not prompting for an update.

Site Admin
Posts: 51
Joined: Sun Dec 14, 2014 5:05 pm
Location: Georgia, USA

Re: Authenticating to the API

Post by admin » Wed Apr 15, 2015 9:46 am

Sorry about the delayed response.

The information you need to pass along to the API is shown on the API documentation page:

Code: Select all

You need to call POST /api/tokenauth with a JSON literal object containing two properties: username and password.

The API will return a response with a property called responseObject. The responseObject property contains your authentication token, which you can use to authorize subsequent API calls by passing the value in the header.

To authorize subsequent API calls, pass an autorization header value containing

Code: Select all

"Token " + token_value_here
with your call.

For the update, are you able to access the following URL form your network?

Code: Select all

Post Reply