From 18f3944a91d7b480e796b6a175a6f78e7e30dda8 Mon Sep 17 00:00:00 2001 From: Cronocide Date: Thu, 12 Sep 2024 21:31:42 -0600 Subject: [PATCH] Updated documentation --- README.md | 52 +++++++++++++-------------- help/GET_ACCESS_TOKEN.md | 77 ---------------------------------------- 2 files changed, 25 insertions(+), 104 deletions(-) delete mode 100644 help/GET_ACCESS_TOKEN.md diff --git a/README.md b/README.md index 2234a8a..912c7e2 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,25 @@ -# Fitbit Wellness Report Web UI - -[Live Demo website](https://fitbit-api-web-ui.onrender.com/) - -[Self Hosted Alternative website](https://fitbit-report.arpan.app/) - -[How to get ACCESS TOKEN](https://github.com/arpanghosh8453/fitbit-web-ui-app/blob/main/help/GET_ACCESS_TOKEN.md) - -![screenshot](https://github.com/arpanghosh8453/fitbit-web-ui-app/blob/main/help/Fitbit_Wellness_Report_Final_v2.jpg) - -# Self-Hosting with Docker - -The following docker container `thisisarpanghosh/fitbit-report-app` is available for self hosting of this project. The Web app will be available on http://localhost:5000 with the configuration below. - -``` -services: - fitbit-ui: - image: 'thisisarpanghosh/fitbit-report-app:latest' - container_name: 'fitbit-report-app' - ports: - - "5000:80" - restart: unless-stopped -``` - -## Contributions - -Special thanks to [@dipanghosh](https://github.com/dipanghosh) for his help and contribution towards the sleep schedule analysis part of the script and overall aesthetics suggestions. +

Fitbit Wellness Report Web UI

+by Arpan Ghosh +

+Live Demo Website Self Hosted Alternative website +
+ +
+ +![screenshot](help/Fitbit_Wellness_Report_Final_v2.jpg) + +## Building + +This app takes no build arguments. To build the container: + +`docker build -t fitbit-web-ui fitbit-web-ui-app/` + +## Configuration + +The variables `CLIENT_ID`, `CLIENT_SECRET`, and `REDIRECT_URL` need to be set to self-host this application. Instructions for getting these values can be found [here](https://dev.fitbit.com/build/reference/web-api/developer-guide/getting-started/). + +## Contributions + +Thanks to [@arpanghosh8453](https://github.com/arpanghosh8453) for sharing their work on the Fitbit API and the report design, and for sharing this project with the world. + +Special thanks to [@dipanghosh](https://github.com/dipanghosh) for his help and contribution towards the sleep schedule analysis part of the script and overall aesthetics suggestions. diff --git a/help/GET_ACCESS_TOKEN.md b/help/GET_ACCESS_TOKEN.md deleted file mode 100644 index b14bc6a..0000000 --- a/help/GET_ACCESS_TOKEN.md +++ /dev/null @@ -1,77 +0,0 @@ -# **How to get Fitbit API Access Token** - - - -## 1. Method one : Official way - - - - -1. Visit [this page](https://dev.fitbit.com/build/reference/web-api/developer-guide/getting-started/) and follow tutorial to create your own application - -2. Open [this page](https://dev.fitbit.com/build/reference/web-api/troubleshooting-guide/oauth2-tutorial/?clientEncodedId=23R3K5&redirectUri=https://localhost:8000/&applicationType=PERSONAL) and continue the process - -3. After you authorize your own application, you will get a ACCESS TOKEN and REFRESH TOKEN after following the whole process - - - - -## Method two : Quick way - - - - -1. Open a tab in the browser and visit [https://dev.fitbit.com/login](https://dev.fitbit.com/login) - -2. Login if you are not logged in the current browser session - -3. Open [this page](https://dev.fitbit.com/build/reference/web-api/explore/) and click on the green Authorize button, click select all to select all the checkbox options and hit “Authorize” button below the dialog box. Then you will see another dialog appear with logout and close button. Now you should hit close - -![](https://lh5.googleusercontent.com/AZgvAQXZIV7K7kOwZOU0GqujkVoIaDjSy7OwtiK_DCeSciPQUF7scf9lZpJhKx1CKz0E9CHCKfYD-wtjU24EVUtFQIpUj6ZpZMSogBtPu_cDde015aDkUilrnx05cTRbT9yBPuq6N_6iCmUBHOekamI) - -4. Scroll down to the Devices section. - -![](https://lh3.googleusercontent.com/Y3Ihrbx9NHsZx91sUyWgUlHror1oa4dZ_HNMfoRgPiENCpmYMH81YtFi_45hnPmIuRKd3kejpitFSS7Svv8EtYHxCi-sdWDfzJ-YJzcPicrj9Z73arTJWZZygV71m5EiAFE6N9h9Y7xpnM6Snn0uty8) - - - - - - - -5. Click on “Try it out” and then click on “Execute” button - - - -![](https://lh4.googleusercontent.com/YfW62QtSBaSSQvT1U_nKMtUQ8oCFweJvsgcW6J4CTN_oCMn0l8-Ye27LgNaMkale_tOWz5kW4agjCzAB64eoIJ_a1Z78_xztf9wDReRw_WEmq_5S5KZGdln8WuEnZcxEYNWW682r6IxfVAMGO8VwYYI) - - - - - - - - - - - -6. You will see the API key in the curl command section. **Carefully copy only the part after the first line ( ending in Bearer )** - - - - -The “*curl -X GET "https://api.fitbit.com/1/user/-/devices.json" -H "accept: application/json" -H "authorization: Bearer*” **line is NOT a part of your API key.** - - - -Also, avoid the quotation mark (“) at the end of the API key when you copy - - - -I have blurred the API key part here in the above image. - -It looks like a long continuous alphanumeric blob of characters without any space or meaningful word. Just copy the API key part. - - - -**REMEMBER : Each API key has an hourly call limit and expires forever after 8 hours. One key will not work forever. If you use the same key in quick succession, you may hit the hourly rate limit.**