Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Elvis339/c66104950d0a7801ef544869786d2c77 to your computer and use it in GitHub Desktop.
Save Elvis339/c66104950d0a7801ef544869786d2c77 to your computer and use it in GitHub Desktop.
Getting Tokens for Active Collab Cloud Instances

Please consider using PHP: https://github.com/activecollab/activecollab-feather-sdk
or Node/TypeScript SDK: https://github.com/Elvis339/activecollab-node-sdk

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

curl -XPOST -d 'email=your-email@test.com&password=**********' https://activecollab.com/api/v1/external/login | python -m json.tool

You should get the following response:

{
    "accounts": [
        {
            "class": "ActiveCollab\\Shepherd\\Model\\Account\\ActiveCollab\\FeatherAccount",
            "display_name": "1761xx",
            "name": 1761xx,
            "url": "https://app.activecollab.com/1761xx"
        },
        {
            "class": "ActiveCollab\\Shepherd\\Model\\Account\\ActiveCollab\\FeatherAccount",
            "display_name": "1895xx",
            "name": 1895xx,
            "url": "https://app.activecollab.com/1895xx"
        },
        {
            "class": "ActiveCollab\\Shepherd\\Model\\Account\\ActiveCollab\\FeatherAccount",
            "display_name": "1299xx",
            "name": 1299xx,
            "url": "https://app.activecollab.com/1299xx"
        },
        {
            "class": "ActiveCollab\\Shepherd\\Model\\Account\\ActiveCollab\\FeatherAccount",
            "display_name": "1803xx",
            "name": 1803xx,
            "url": "https://app.activecollab.com/1803xx"
        },
        {
            "class": "ActiveCollab\\Shepherd\\Model\\Account\\ActiveCollab\\FeatherAccount",
            "display_name": "1851xx",
            "name": 1851xx,
            "url": "https://app.activecollab.com/1851xx"
        }
    ],
    "is_ok": 1,
    "user": {
        "avatar_url": "/var/www/shepherd/upload/avatars/user-526988.jpg",
        "first_name": "",
        "intent": "LONG-SECURE-STRING",
        "last_name": ""
    }
}

"accounts" are instances that you have access to:

  • "class" - a type of Active Collab instance.

  • "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/YOUR-ACCOUNT-ID/api/v1/issue-token-intent” with "intent", "client_vendor", and "client_name" as parameters.

curl -XPOST -d ‘intent=INTENT&client_name=AppName&client_vendor=AppVendor’ https://app.activecollab.com/YOUR-ACCOUNT-ID/api/v1/issue-token-intent

3. If everything is okay you should get X-Angie-AuthApiToken which is used to validate any request.

curl -H "X-Angie-AuthApiToken: YOUR-TOKEN-HERE" https://app.activecollab.com/YOUR-ACCOUNT-ID/api/v1/projects | python -m json.tool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment