How do I authenticate with Stackato 3.x?

Posted by jamesf on 2014-05-29 09:38
OS: All / Any | Product: Stackato | tags: authentication http stackato

I'm writing a script that interacts with Stackato. How do I get an authorization token?


In this example, let's assume your Stackato host is and your Username/Password are JamesF/securepass

Issue an HTTP POST to the aok endpoint of your Stackato system. This will usually be similar to the api endpoint, but begin with "aok", something like "".

The POST request should contain an AUTHORIZATION header with a value of "Basic Y2Y6" and the parameters should be username, password and a parameter "grant_type" with a value of "password":


Thus, here is an example request using cURL:

$ curl -k -H 'AUTHORIZATION: Basic Y2Y6' -d "username=JamesF&password=securepass&grant_type=password"

From this request you should receive an access token which can then be used in an Authorization header for future REST requests. For example, to then get Stackato usage as an admin, you might issue:

$ curl -k -H 'Authorization: bearer <access_token>'