PHPackages                             demo-git/fitbit - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. demo-git/fitbit

ActiveLibrary[API Development](/categories/api)

demo-git/fitbit
===============

Fitbit REST API library

1.1(9y ago)021PHPPHP &gt;=5.4

Since Mar 10Pushed 9y ago1 watchersCompare

[ Source](https://github.com/demo-git/Fitbit)[ Packagist](https://packagist.org/packages/demo-git/fitbit)[ Docs](https://github.com/demo-git/Fitbit)[ RSS](/packages/demo-git-fitbit/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (1)Versions (8)Used By (0)

Fitbit API
----------

[](#fitbit-api)

Very basic Fitbit API. There are working Oauth 2 and few Fitbit endpoints.

Examples
--------

[](#examples)

First you have to generate login url.

```
$fitbit = new Fitbit('Client ID', 'Client (Consumer) Secret');
echo $fitbit->getLoginUrl('http://yourcallbackurl.cz', ['profile']);

```

User is redirected to your callback url with code in paramters. Get this code and request token from fitbit.

```
$token = $fitbit->getToken('CODE', 'http://yourcallbackurl.cz');
$fitbit->setToken($token);

```

Token have only 1 hour duration and you have to use refresh token endpoint

```
if ($_SESSION['fitbit']->dateExpire refreshToken($_SESSION['fitbit']);
    $_SESSION['fitbit']->dateExpire = (time() - 60) + $_SESSION['fitbit']->expires_in;
}

```

After you have token, you can use Fitbit endpoints.

```
print_r($fitbit->profile->get());

$fitbit->sleep->log(new \DateTime("2016-03-10 10:24"), 8 *60 * 60 * 1000);

print_r($fitbit->water->get(new \DateTime("2016-03-10")));

```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 58.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~53 days

Recently: every ~65 days

Total

6

Last Release

3451d ago

Major Versions

v0.2.0 → 1.02016-11-17

### Community

Maintainers

![](https://www.gravatar.com/avatar/66a516244d4d9dbe28ac8d4150617ba18ced9f6113179bb1aee77945e35f8ae6?d=identicon)[demo-git](/maintainers/demo-git)

---

Top Contributors

[![fabulator](https://avatars.githubusercontent.com/u/3653022?v=4)](https://github.com/fabulator "fabulator (21 commits)")[![pavelrisenberg](https://avatars.githubusercontent.com/u/576661?v=4)](https://github.com/pavelrisenberg "pavelrisenberg (13 commits)")[![jgkim](https://avatars.githubusercontent.com/u/86622?v=4)](https://github.com/jgkim "jgkim (2 commits)")

---

Tags

fitbit

### Embed Badge

![Health badge](/badges/demo-git-fitbit/health.svg)

```
[![Health](https://phpackages.com/badges/demo-git-fitbit/health.svg)](https://phpackages.com/packages/demo-git-fitbit)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
