08-27-2017 00:57
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

08-27-2017 00:57
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hello Everybody,
I would like to get Fitbit Data via API at PHP.
Therefor I need help.
I have already registered my App so I got the Client ID and Client Secret.
But now I don`t know how to make the Request for getting Data.
I think I have to use the Fitbit provider for PHP League's OAuth 2.0 client.
- https://github.com/djchen/oauth2-fitbit
- https://github.com/thephpleague/oauth2-client
Has the "oauth2-fitbit" to be unpacked inside a Directory of "oauth2-client"?
It would be fine if somebody could help me a little bit...
Greetings from Germany,
NoWo
08-27-2017 01:42
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


08-27-2017 01:42
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I used those. You should use 'composer' to install, as stated here. From memory, that will automatically pull in both packages because the dependency is specified.
Gondwana Software

08-27-2017 02:09
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

08-27-2017 02:09
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi Catplace, thank you for your Solution but I can`t use Composer because it is not my own Server. I only have FTP, MySQL, PHP to use, so I have to do it manually 😞

08-27-2017 02:28
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


08-27-2017 02:28
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
hmmmm, tricky. I'll try to send you a directory listing, but it's pretty long. There may be more requirements than just those two packages.
Once you get everything in place, you might still have problems with autoloading.
Gondwana Software

08-27-2017 04:06
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

08-27-2017 04:06
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Thank you for sending your directory listing. You`re right: for example autoload is not in these two packages...
Would it be possible to make an archive (like *.zip) from your Directory and send me the download-link? For Security please delete your App-Id / Client Secret 😉

08-27-2017 14:29
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


08-27-2017 14:29
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Done. I don't know how much help it will be. It may not be complete either, since the packages included will depend on what was already available on my server.
Gondwana Software

08-27-2017 14:39
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

08-27-2017 14:39
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Thank you very much, I`ve downloaded it, you can delete the file on your webspace.
I think if it is working at your project It has to be working in my project too, because the files are the same so no file is missing or a different version...
Tomorrow I will see what and where I have to config and shurely need your help but first I whant to see If I can get it by my own.
Good n8

08-27-2017 15:07
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


08-27-2017 15:07
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Thanks for letting me know.
I think the only file I customised is vendor\djchen\oauth2-fitbit\src\Provider\Fitbit.php. In getDefaultScopes(), I restricted the scopes returned to only those I needed. You can still see the full list, commented out.
I love your determination to fight with this yourself! 🙂
Gondwana Software

