あーく・りなっくす

プログラミングとかガジェットとかの雑記

Fitbit API を使ってみる

ここから登録やドキュメントの確認ができる。

API を利用することで、サーバに同期済みのデータを取得したり、Fitbit のデバイス以外からデータを追加することができるようだ(別のフィットネス系のアプリなどから流せたりするのかもしれない[要出典])。

アプリケーションの登録は Twitter で登録するのとほぼ同じ感覚だと思う。 "OAuth 2.0 Application Type" という項目では選択肢が 3 つあり、Personal だと取得できるデータが多いようだ。

Server
"Server" applications authenticate using the Authorization Code Grant Flow.

Client
"Client" applications authenticate using either the Authorization Code Grant Flow or the Implicit Grant Flow. An advantage of "Client" applications is that they allow for client-side authentication.

Personal
"Personal" applications authenticate using either the Authorization Code Grant Flow or the Implicit Grant Flow, and also have access to the intraday time series data (such as Heart Rate or Activity) of the owner of the app only.

定期的にデータを取得して、Slack とかに投げてみようと思う。