10-08-2020 05:39
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

10-08-2020 05:39
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Dear all,
i have a problem integrating this package to the Laravel. Process of implementation pasted ok, but when i call in my controller 1 line of code:
public function index()
{
Fitbit::activities()->activity()->getLifetimeStats();
}
Application is returning me a constant error:
TypeError: Argument 1 passed to GrahamCampbell\Manager\AbstractManager::makeConnection() must be of the type string, null given, called in C:\projects\hypknowledge\vendor\graham-campbell\manager\src\AbstractManager.php on line 75 in file C:\projects\hypknowledge\vendor\graham-campbell\manager\src\AbstractManager.php on line 133
I don`t know what to do, days are passing by, and i cannot solve an issue.
Thank you in advance
Answered! Go to the Best Answer.
Accepted Solutions
10-08-2020 08:05
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

10-08-2020 08:05
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Also when i try this peace of code:
public function index()
{
Fitbit::connection('main')->activities()->activity()->getLifetimeStats();
}
It returns me an error:
InvalidArgumentException: Connection [main] not configured. in file c:\projects\test\vendor\graham-campbell\manager\src\AbstractManager.php on line 189

10-08-2020 08:05
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

10-08-2020 08:05
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Also when i try this peace of code:
public function index()
{
Fitbit::connection('main')->activities()->activity()->getLifetimeStats();
}
It returns me an error:
InvalidArgumentException: Connection [main] not configured. in file c:\projects\test\vendor\graham-campbell\manager\src\AbstractManager.php on line 189

10-10-2020 20:17
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



10-10-2020 20:17
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi @Vassco
I'm not sure what is causing these errors. If you received this code from an open source project, did you reach out to that person for help? Also, here's the link to the documentation for Get Lifetime Stats, https://dev.fitbit.com/build/reference/web-api/activity/#get-lifetime-stats. Check that the library you're using is creating the endpoint correctly.
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google

