Colony uses OAuth 2.0 as it's authentication mechanism in order to interact with the API. Below is an outline on how to get your OAuth credentials in order to make calls to the API.
Firstly you need to create a client that users can give access to, if you do not alreay have a client you can create one here. There you will be able to get your API Key and Secret.
To request an access token, submit a POST request to the url https://api.colonyhq.com/oauth2/access_token/ with the following fields:
You can use the command line to test that your local configuration is working:
curl -X POST -d "client_id=<your-client-id>&client_secret=<your-client-secret>&grant_type=password&username=<your-username>&password=<your-password>" https://api.colonyhq.com/oauth2/access_token/
You should get a response that looks something like this:
{
"access_token": "<your-access-token>",
"scope": "read",
"expires_in": 86399,
"refresh_token": "<your-refresh-token>"
}
The command line to test the authentication looks like:
curl -H "Authorization: Bearer <your-access-token>" https://api.colonyhq.com/collate/campaigns/
That should return a list of all the campaigns you have access to.