Bring Your Own OAuth (BYOO) is available for the Grow and Scale plans.
WHOOP BYOO is available for the Launch, Grow and Scale plans. See our WHOOP Guide for more information.
google_health provider. Complete the setup separately for each Junction environment and region that you use.
Before you begin
You need:- A Google Cloud project administered by your organization
- A Google account that is a Project Owner for that project
- DNS access for a domain that your organization owns
- Public application homepage, privacy policy, and terms of service pages
- A customer-hosted HTTPS OAuth callback endpoint
Prepare the Junction environment
Open Config > Custom Credentials in the Junction Dashboard, select Google Health, and copy the preparation values displayed before the credential form. Alternatively, call Prepare team custom credentials with:- Redirect URI: the Junction callback for the selected environment and region
- IAM principal: the Junction service account that must impersonate your service account
For production, the returned Junction redirect URI is the target of your callback forwarder. It is not the redirect URI registered with Google, because your organization cannot verify ownership of a Junction domain.
Configure Google Cloud and OAuth
1
Create the Google Cloud project
Create or select the project, enable Google Health API, and record its project ID and numeric project number. Junction requires the project number, not the project ID.
2
Configure branding and policies
In Google Auth Platform > Branding, configure your application name, logo, support email, developer contacts, homepage, privacy policy, and terms of service.The public pages and an in-product disclosure shown immediately before consent must accurately explain how your application accesses, uses, stores, deletes, and shares Google Health data. Describe Junction as a service that receives and processes the data on your behalf. Your homepage or privacy policy must affirm that your use of Google Health information complies with the Google Health API data policy, including its Limited Use requirements.
3
Verify your domain
Using the Google Cloud Project Owner account, add the registrable root domain as a Domain property in Google Search Console, publish Google’s DNS TXT record, and verify ownership. Keep the TXT record in DNS, then add the root domain under Google Auth Platform > Branding > Authorized domains.Every domain used by your homepage, policy pages, JavaScript origins, or redirect URIs must be authorized and verifiable by your organization. Keep the list minimal: Google permits no more than ten authorized domains in a verification request.
4
Host the OAuth callback
Host an HTTPS callback on your verified domain, for example:The endpoint must accept Google’s Use the Junction target for the same environment and region. See Hosting OAuth Callbacks on Your Own Domain for all targets and implementation requirements.
GET request, preserve the complete query string without parsing or re-encoding it, and return 307 Temporary Redirect to the Junction redirect URI returned by the preparation step.5
Create the OAuth client
Create a Web application OAuth client. Google may call this option Web Server, including for native products that use Junction on their backend.Register your customer-hosted callback as the authorized redirect URI. Do not use Google’s
https://www.google.com quick-start placeholder or the Junction callback directly. Save the OAuth client ID and client secret securely.6
Add the scopes
In Google Auth Platform > Data Access, add every scope requested by your Junction flow. Without custom team scope requirements, Junction requests all of these supported read-only scopes:
Junction currently requests and uses only the read-only scopes listed above, so do not request Google Health write scopes. If your product does not use every resource, configure team scope requirements before testing so the consent flow requests only the scopes you can justify. Google requires a justification and an in-product demonstration for every restricted scope requested. See the Google Health scope reference.
Configure the service account and IAM
Create a service account in the Google Health project. Junction uses it only to manage the Google Health subscriber and user subscriptions; end-user health data still requires user OAuth consent. Grant the service account Google Health API Editor (roles/health.editor) on the project. Then grant the Junction IAM principal returned by the preparation step Service Account Token Creator (roles/iam.serviceAccountTokenCreator) on that service account.
You can configure both grants in Google Cloud Console or with gcloud:
Add the credentials to Junction
In Config > Custom Credentials > Google Health, enter:- OAuth Client ID
- OAuth Client Secret
- Redirect URL Override: your customer-hosted callback URL
- Project Number: the numeric Google Cloud project number
- Service Account Email
Test authorization and data access
1
Prepare a test user
Add the Google account under Google Auth Platform > Audience > Test users. Ensure the account has representative Fitbit or Pixel Watch data and has recently synchronized with Google Health.
2
Complete authorization
Use Junction Link to connect
google_health. Confirm that the callback returns to Junction, the consent screen contains the expected scopes, and the connection-created event is delivered.3
Verify ingestion
Confirm the connection through Get user’s connected providers, inspect available resources through user resources, and monitor historical pulls. Google Health backfills up to 90 days of available data.
4
Read and update data
Read at least one populated resource through the Data Access API, such as Activity Summary or Steps. Then synchronize new source data and confirm that Junction delivers the corresponding update webhook.
Record the verification video
Use the OAuth client intended for production, along with the branding, callback, and application that you will submit. The client can remain in Testing while you record with an allowlisted test user. Record the complete customer-facing flow:- Start the Google Health connection from your application and complete the end-to-end OAuth grant flow, including Junction Link.
- Show the same application name and branding as your submission.
- Set the consent screen language to English, then show the complete screen with every requested scope and the browser address bar containing the submitted OAuth client ID.
- Return to your application and demonstrate the user-facing functionality enabled by each requested scope.
- If your application uses multiple OAuth clients, show how it accesses data through each client.
Submit the production application
Before submitting, confirm that your production application:- Uses only the scopes its user-facing features require
- Has verified domains and consistent branding, homepage, privacy policy, and terms URLs
- Provides an accurate in-product disclosure and data deletion path
- Has working reviewer credentials or test instructions
- Uses the production customer-owned callback and Junction credentials