Skip to content

Instantly share code, notes, and snippets.

@aleksandar-olic
Last active December 26, 2019 12:06
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save aleksandar-olic/e04207c7712ba9f65fb7 to your computer and use it in GitHub Desktop.
Save aleksandar-olic/e04207c7712ba9f65fb7 to your computer and use it in GitHub Desktop.
Getting Tokens for Active Collab Cloud Instances

1. Send a POST request to "https://my.activecollab.com/api/v1/external/login" with "email" and "password" as parameters.

You should get the following response:

{
 accounts = ({
  class = FeatherApplicationInstance;
  "display_name" = "A51 (ID: 1)";
  name = 1;
  url = "https://app.activecollab.com/1";
  } // plus any other instances you have access to
);
 user = {
  "avatar_url" = "https://my.activecollab.com/avatars/user_183394.png";
  "first_name" = Tomislav;
  intent = "long string";
  "last_name" = "Todorov Filipovic";
 };
}

"accounts" are instances that you have access to:

  • "class" - a type of Active Collab instance (FeatherApplicationInstance is the current, new version).
  • "name" - ID of the cloud instance
  • "display_name" - the name of the instance like "Company Name (ID: #)"
  • "url" - URL to your Active Collab instance

"user" contains the URL of the user's avatar, first name, last name, and the intent for the token.

2. Send a POST request to “https://app.activecollab.com/1/api/v1/?format=json&path_info=%2Fissue-token-intent” with "intent", "client_vendor", and "client_name" as parameters. Just switch "https://app.activecollab.com/1" with your instance's URL.

@RoryDungan
Copy link

For anyone else's benefit, once you have a token you need to put it in the X-Angie-AuthApiToken header on your other requests. I don't believe the current API documentation specifies which header name to use, but that one worked for me.

@ivankristic
Copy link

If youre having issues and dont know what to do, just open official PHP sdk, and go through the code, youll find all of the working endpoints there.

At this point

  • login https://my.activecollab.com/api/v1/external/login
  • token https://app.activecollab.com/<ACCOUNT_ID>/api/v1/issue-token-intent
  • other content https://app.activecollab.com/<ACCOUNT_ID>/api/v1/<CONTENT>

note subdomain distinction - my | app
also you can send all post requests with json body and Content-Type: application/json header
and what @RoryDungan said, X-Angie-AuthApiToken: <TOKEN> is header

official documentation is misleading, and the whole api is just a bad experience

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment