Gets the user's identity.
It includes the legacy Fitbit user ID and the Google user ID and it can be used by migrating clients to map identifiers between the two systems.
HTTP request
GET https://health.googleapis.com/v4/{name=users/*/identity}
The URL uses gRPC Transcoding syntax. To know more about valid error responses that can be thrown by this HTTP request, please refer to the service error catalog
Path parameters
| Parameters | |
|---|---|
name |
Required. The resource name of the Identity. Format: |
Request body
The request body must be empty.
Response body
Represents details about the Google user's identity.
If successful, the response body contains data with the following structure:
| JSON representation |
|---|
{ "name": string, "legacyUserId": string, "healthUserId": string } |
| Fields | |
|---|---|
name |
Identifier. The resource name of this Identity resource. Format: |
legacyUserId |
Output only. The legacy Fitbit User identifier. This is the Fitbit ID used in the legacy Fitbit APIs (v1-v3). It can be referenced by clients migrating from the legacy Fitbit APIs to map their existing identifiers to the new Google user ID. It must not be used for any other purpose. It is not of any use for new clients using only the Google Health APIs. Valid values are strings of 1-63 characters, and valid characters are lowercase and uppercase letters, numbers, and hyphens. |
healthUserId |
Output only. The Google User Identifier in the Google Health APIs. It matches the Valid values are strings of 1-63 characters, and valid characters are lowercase and uppercase letters, numbers, and hyphens. |
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/googlehealth.profilehttps://www.googleapis.com/auth/googlehealth.profile.readonlyhttps://www.googleapis.com/auth/googlehealth.settingshttps://www.googleapis.com/auth/googlehealth.settings.readonlyhttps://www.googleapis.com/auth/googlehealth.activity_and_fitnesshttps://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonlyhttps://www.googleapis.com/auth/googlehealth.health_metrics_and_measurementshttps://www.googleapis.com/auth/googlehealth.health_metrics_and_measurements.readonlyhttps://www.googleapis.com/auth/googlehealth.locationhttps://www.googleapis.com/auth/googlehealth.location.readonlyhttps://www.googleapis.com/auth/googlehealth.nutritionhttps://www.googleapis.com/auth/googlehealth.nutrition.readonlyhttps://www.googleapis.com/auth/googlehealth.sleephttps://www.googleapis.com/auth/googlehealth.sleep.readonly
For more information, see the OAuth 2.0 Overview.