1

I'm trying to connect to our cloud account, but I get the following error:

Fatal error: Uncaught Error: Class 'ActiveCollab\SDK\Authenticator\Cloud' not found in /www/htdocs/asdf/asdf.org/example-cloud.php:13 Stack trace: #0 {main} thrown in /www/htdocs/asf/asdf.org/example-cloud.php on line 13

    require_once('https://app.activecollab.com/xxxxxx/autoload.php');

// Provide name of your company, name of the app that you are developing, your email address and password.
$authenticator = new \ActiveCollab\SDK\Authenticator\Cloud('xxx', 'My Awesome Application', 'vvv@ghf.de', '123qwe123*');

// Show all Active Collab 5 and up account that this user has access to.
print_r($authenticator->getAccounts());

// Show user details (first name, last name and avatar URL).
print_r($authenticator->getUser());

// Issue a token for account #123456789.
$token = $authenticator->issueToken('123456789');

// Did we get it?
if ($token instanceof \ActiveCollab\SDK\TokenInterface) {
    print $token->getUrl() . "\n";
    print $token->getToken() . "\n";
} else {
    print "Invalid response\n";
    die();
}

What did I wrong?

Ilija
  • 4,105
  • 4
  • 32
  • 46
fisch haus
  • 11
  • 2

2 Answers2

0

First line in your code example is not good. You should check the article on basic usage of Composer prior to continuing: https://getcomposer.org/doc/01-basic-usage.md

Once you have properly set up Composer in your development environment, required ActiveCollab SDK, and updated dependencies, your first line will most probably look like this:

require __DIR__ . '/vendor/autoload.php';
Ilija
  • 4,105
  • 4
  • 32
  • 46
0

But you said: Installation If 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:

So I tried to pull down the repository s- or am I wrong ... https://github.com/activecollab/activecollab-feather-sdk

fisch haus
  • 11
  • 2