To start using the ActiveCollab API, you need to authenticate and retrieve an API token. This process differs slightly depending on whether your account uses two-factor authentication (2FA) and whether you're on the Cloud or Self-Hosted version.
You can find self-hosted documentation here.
1. Login:
POST https://activecollab.com/api/v1/external/login
{
"email": {{YOUR_EMAIL}},
"password": {{YOUR_PASSWORD}}
}
curl -X POST https://activecollab.com/api/v1/external/login \
-H "Content-Type: application/json" \
-d '{
"email": {{YOUR_EMAIL}},
"password": {{YOUR_PASSWORD}}
}'
Response if you are not using 2FA:
{
"accounts": [...]
"is_ok": 1,
"user": {
...
"intent": {{INTENT}}
}
}
Response if you are using 2FA:
{
"intent_id": {{INTENT_ID}}
}
If you are using 2FA, send another request with a different body to the same endpoint:
POST https://activecollab.com/api/v1/external/login
{
"intent_id": {{INTENT_ID}},
"code": {{AUTH_APP_CODE}}
}
cURL
curl -X POST https://activecollab.com/api/v1/external/login \
-H "Content-Type: application/json" \
-d '{
"intent_id": {{INTENT_ID}},
"code": {{AUTH_APP_CODE}}
}'
Response:
{
"accounts": [...]
"is_ok": 1,
"user": {
...
"intent": {{INTENT}}
}
}
Either if you are using 2FA or not next request will be the same:
POST https://app.activecollab.com/{{YOUR_INSTANCE_ID}}/api/v1/issue-token-intent
{
"client_name": {{YOUR_APPLICATION_NAME}},
"client_vendor": {{YOUR_COMPANY_NAME}},
"intent": {{INTENT}}
}
curl -X POST https://app.activecollab.com/{{YOUR_INSTANCE_ID}}/api/v1/issue-token-intent \
-H "Content-Type: application/json" \
-d '{
"client_name": {{YOUR_APPLICATION_NAME}},
"client_vendor": {{<YOUR_COMPANY_NAME>}},
"intent": {{INTENT}}
}'
Response:
{
"is_ok": true,
"token": {{YOUR_TOKEN}}
}
Now you can try fetching some projects:
GET https://app.activecollab.com/{{YOUR_INSTANCE_ID}}/api/v1/projects
Headers:
X-Angie-AuthApiToken: {{TOKEN}}
cURL
curl -X GET https://app.activecollab.com/1/api/v1/projects \
-H "X-Angie-AuthApiToken: {{TOKEN}}"
Response:
[
{
"id": 1,
"class": "Project",
"url_path": "/projects/1",
"name": "Project",
...
},
...
]