Authentication is done in two steps. First one is to authenticate to main authentication service (https://activecollab.com):
curl -XPOST -d '[email protected]&password=******' https://activecollab.com/api/v1/external/login
This call will return a list of accounts that authenticated user has access to, as well as user details:
{
"is_ok": true,
"accounts": [
{
"class": "FeatherApplicationInstance",
"display_name": "Company Name (ID: #ACCOUNT_ID#)",
"name": 1,
"url": "https://app.activecollab.com/#ACCOUNT_ID#"
}
],
"user": {
"avatar_url": "https://activecollab.com/avatars/user_#USER_ID#.png",
"first_name": "John",
"last_name": "Doe",
"intent": "long string"
}
}
Among user properties there's intent
property. It is used to authenticate agains a particular Active Collab 5 accounts, like this:
curl -XPOST -d 'intent=LONG-INTENT-STRING-HERE&client_name=AppName&client_vendor=AppVendor' https://app.activecollab.com/#ACCOUNT_ID#/api/v1/issue-token-intent
Client vendor and client name are names of your organisation, and name of your app. This call will return a token that you can use to make further API calls in that account:
curl -H "X-Angie-AuthApiToken: TOKEN-HERE" https://app.activecollab.com/#ACCOUNT_ID#/api/v1/projects
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…