How to register your own Google Health OAuth app
Register an OAuth app for the Google Health API and connect it to Tenklo
This guide shows you how to register your own app with Google to obtain your OAuth credentials (client ID and secret). These are required to let your users grant your app access to their Google Health data.
Google Health scopes can require OAuth app verification and a third-party security review before you support more than 100 users.
Follow our guide to prepare for Google's OAuth review.
- Go to the Google Cloud Console.
- Click the project selector at the top of the page.
- Click New project.
- Enter a project name.
- Select the organization or folder where the project belongs.
- Click Create and select the new project.
- In the Google Cloud Console, open APIs & Services > Library.
- Search for Google Health API.
- Select the API and click Enable.
Configure the OAuth consent screen
- Open APIs & Services > OAuth consent screen.
- Click Get started.
- Enter the app name and user support email.
- Select the audience for your app:
- External for apps available to any Google user
- Internal for apps restricted to your Google Workspace organization
- Add your contact email addresses.
- Add the required app URLs, including your application website, privacy policy, and terms of service.
- Add authorized domains for the domains that host your app.
If your OAuth consent screen is in Testing mode, add each test user before they authorize the app.
- Open APIs & Services > OAuth consent screen > Audience.
- Under Test users, click Add users.
- Enter each Google account email address that should be allowed to authorize your app.
- Click Save.
In Testing mode, Google refresh tokens expire after 7 days. Publish the OAuth app before using it in production.
- Open APIs & Services > OAuth consent screen > Data access.
- Click Add or remove scopes.
- Search for Google Health API.
- Select only the scopes your app needs.
- Click Update, then Save.
Common read scopes include:
https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly
https://www.googleapis.com/auth/googlehealth.health_metrics_and_measurements.readonly
https://www.googleapis.com/auth/googlehealth.profile.readonly
https://www.googleapis.com/auth/googlehealth.sleep.readonlyUse write-only scopes only when your app creates, updates, or deletes Google Health data.
- Open APIs & Services > Credentials.
- Click Create credentials and select OAuth client ID.
- Select Web application as the application type.
- Enter a name for the OAuth client.
- Under Authorized redirect URIs, add
https://api.tenklo.dev/oauth/callback. - If you test from the Tenklo dashboard, add
https://app.tenklo.devunder Authorized JavaScript origins. - Click Create.
- Copy the client ID and client secret.
Configure the integration in Tenklo
- In Tenklo, open Integrations and configure a new Google Health integration.
- Paste the Google OAuth client ID and client secret.
- Add the same Google Health scopes you configured on the OAuth consent screen.
- Save the integration.
Start building your integration
Follow the Quickstart to connect your first Google Health account.
Most production Google Health apps need OAuth app verification, and apps with more than 100 users require a third-party security review.
- Follow the Google app and security review guide.
- After approval, open APIs & Services > OAuth consent screen > Audience.
- Click Publish app to move from Testing to Production.
Fitbit migration notes
Fitbit Web API tokens do not transfer to Google Health. Ask existing Fitbit users to authorize the new Google Health integration, verify the new credentials, then update your application to use the Google Health connection.
After consent, call GET /v4/users/me/identity through the Tenklo proxy and store both identifiers returned by Google Health. The response includes the legacy Fitbit user ID and the Google Health user ID.
For more details, see: