{"id":27158898,"url":"https://github.com/activecollab/activecollab-feather-sdk","last_synced_at":"2025-04-08T22:39:26.526Z","repository":{"id":28207077,"uuid":"31710663","full_name":"activecollab/activecollab-feather-sdk","owner":"activecollab","description":"PHP SDK for ActiveCollab 5 and 6 API","archived":false,"fork":false,"pushed_at":"2019-09-09T15:04:32.000Z","size":110,"stargazers_count":52,"open_issues_count":12,"forks_count":20,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-30T13:03:28.316Z","etag":null,"topics":["activecollab","api-client","php"],"latest_commit_sha":null,"homepage":"https://activecollab.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/activecollab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-05T11:24:47.000Z","updated_at":"2024-08-12T09:26:58.000Z","dependencies_parsed_at":"2022-08-03T04:45:30.330Z","dependency_job_id":null,"html_url":"https://github.com/activecollab/activecollab-feather-sdk","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/activecollab%2Factivecollab-feather-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/activecollab%2Factivecollab-feather-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/activecollab%2Factivecollab-feather-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/activecollab%2Factivecollab-feather-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/activecollab","download_url":"https://codeload.github.com/activecollab/activecollab-feather-sdk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247941718,"owners_count":21022035,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["activecollab","api-client","php"],"created_at":"2025-04-08T22:39:25.903Z","updated_at":"2025-04-08T22:39:26.514Z","avatar_url":"https://github.com/activecollab.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP SDK for ActiveCollab 5 and 6 API\n\nThis is a simple PHP library that makes communication with [Active Collab API](https://developers.activecollab.com/api-documentation/) easy.\n\n## Installation\n\nIf you choose to install this application with Composer instead of pulling down the git repository you will need to add a composer.json file to the location you would like to pull the repository down to featuring:\n\n```json\n{\n    \"require\": {\n        \"activecollab/activecollab-feather-sdk\": \"^3.0\"\n    }\n}\n```\n    \nRun a `composer update` to install the package.\n\n*Note*: If you used an older version of Active Collab API wrapper and loaded it using `dev-master`, lock it to version 2.0 by setting require statement to `^2.0` and calling `composer update`.\n\n## Connecting to Active Collab Cloud Accounts\n\n```php\n\u003c?php\n\nrequire_once '/path/to/vendor/autoload.php';\n\n// Provide name of your company, name of the app that you are developing, your email address and password.\n$authenticator = new \\ActiveCollab\\SDK\\Authenticator\\Cloud('ACME Inc', 'My Awesome Application', 'you@acmeinc.com', 'hard to guess, easy to remember');\n\n// Show all Active Collab 5 and up account that this user has access to.\nprint_r($authenticator-\u003egetAccounts());\n\n// Show user details (first name, last name and avatar URL).\nprint_r($authenticator-\u003egetUser());\n\n// Issue a token for account #123456789.\n$token = $authenticator-\u003eissueToken(123456789);\n\n// Did we get it?\nif ($token instanceof \\ActiveCollab\\SDK\\TokenInterface) {\n    print $token-\u003egetUrl() . \"\\n\";\n    print $token-\u003egetToken() . \"\\n\";\n} else {\n    print \"Invalid response\\n\";\n    die();\n}\n```\n\n## Connecting to Self-Hosted Active Collab Accounts\n\n```php\nrequire_once '/path/to/vendor/autoload.php';\n\n// Provide name of your company, name of the app that you are developing, your email address and password. Last parameter is URL where your Active Collab is installed.\n$authenticator = new \\ActiveCollab\\SDK\\Authenticator\\SelfHosted('ACME Inc', 'My Awesome Application', 'you@acmeinc.com', 'hard to guess, easy to remember', 'https://my.company.com/projects');\n\n// Issue a token.\n$token = $authenticator-\u003eissueToken();\n\n// Did we get what we asked for?\nif ($token instanceof \\ActiveCollab\\SDK\\TokenInterface) {\n    print $token-\u003egetUrl() . \"\\n\";\n    print $token-\u003egetToken() . \"\\n\";\n} else {\n    print \"Invalid response\\n\";\n    die();\n}\n```\n\n## SSL problems?\n\nIf curl complains that SSL peer verification has failed, you can turn it off like this:\n\n```php\n// Cloud\n$authenticator = new \\ActiveCollab\\SDK\\Authenticator\\Cloud('ACME Inc', 'My Awesome Application', 'you@acmeinc.com', 'hard to guess, easy to remember', false);\n$authenticator-\u003esetSslVerifyPeer(false);\n\n// Self-hosted\n$authenticator = new \\ActiveCollab\\SDK\\Authenticator\\SelfHosted('ACME Inc', 'My Awesome Application', 'you@acmeinc.com', 'hard to guess, easy to remember', 'https://my.company.com/projects', false);\n$authenticator-\u003esetSslVerifyPeer(false);\n\n// Client\n$client = new \\ActiveCollab\\SDK\\Client($token);\n$client-\u003esetSslVerifyPeer(false);\n```\n\n**Note:** Option to turn off SSL peer verification has been added in Active Collab SDK 3.1.\n\n## Constructing a client instance\n\nOnce we have our token, we can construct a client and make API calls:\n\n```php\n$client = new \\ActiveCollab\\SDK\\Client($token);\n```\n\nListing all tasks in project #65 is easy. Just call:\n\n```php\n$client-\u003eget('projects/65/tasks');\n```\n\nTo create a task, simply send a POST request:\n\n```php\ntry {\n    $client-\u003epost('projects/65/tasks', [\n      'name' =\u003e 'This is a task name',\n      'assignee_id' =\u003e 48\n    ]);\n} catch(AppException $e) {\n    print $e-\u003egetMessage() . '\u003cbr\u003e\u003cbr\u003e';\n    // var_dump($e-\u003egetServerResponse()); (need more info?)\n}\n```\n\nTo update a task, PUT request will be needed:\n\n```php\ntry {\n    $client-\u003eput('projects/65/tasks/123', [\n        'name' =\u003e 'Updated named'\n    ]);\n} catch(AppException $e) {\n    print $e-\u003egetMessage() . '\u003cbr\u003e\u003cbr\u003e';\n    // var_dump($e-\u003egetServerResponse()); (need more info?)\n}\n```\n\n``post()`` and ``put()`` methods can take two arguments:\n\n1. ``command`` (required) - API command,\n3. ``variables`` - array of request variables (payload)\n\nTo remove a task, call:\n\n```php\ntry {\n    $client-\u003edelete('projects/65/tasks/123');\n} catch(AppException $e) {\n    print $e-\u003egetMessage() . '\u003cbr\u003e\u003cbr\u003e';\n    // var_dump($e-\u003egetServerResponse()); (need more info?)\n}\n```\n\n``delete()`` method only requires ``command`` argument to be provided.\n\nFor full list of available API command, please check [Active Collab API documentation](https://developers.activecollab.com/api-documentation/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factivecollab%2Factivecollab-feather-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Factivecollab%2Factivecollab-feather-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factivecollab%2Factivecollab-feather-sdk/lists"}