The Google Health API lets you view and manage health and fitness metrics and measurement data.
Service: health.googleapis.com
When facing errors, refer to this catalog alongside using our client libraries. If you're using your own libraries, keep this guide handy for debugging and error resolution. To know more about the error response structure, visit the error overview page.
Error codes
The following table lists HTTP status codes and associated errors that you might encounter when interacting with our API. Each status code corresponds to one or more reasons and descriptions to help you troubleshoot and handle errors effectively in your application. Within the descriptions, variables denoted by curly braces ({}) represent placeholders for values that are specific to your request.
| Reason | HTTP Status Code | Description |
|---|---|---|
ACCOUNT_NOT_LINKED |
400 |
The Google account is not linked to a Fitbit account. |
INVALID_PARENT_DATA_TYPE_COLLECTION_FORMAT |
400 |
Invalid {field} format. Expected: {expectedFormat}; Got: {actualValue}. |
INVALID_PARENT_DATA_TYPE_COLLECTION |
400 |
Invalid data type ID referenced in the parent data type collection: {dataType}. |
INVALID_FILTER_FORMAT |
400 |
Invalid filter format. |
INVALID_DATA_POINT_DATA_SOURCE_FAMILY |
400 |
Invalid data source family in filter. |
INVALID_DATA_POINT_FILTER |
400 |
Invalid filter. |
INVALID_DATA_POINT_FILTER_SYNTAX |
400 |
Invalid filter syntax. |
INVALID_DATA_POINT_FILTER_MISSING_TOKEN |
400 |
Invalid filter: missing token. |
INVALID_DATA_POINT_FILTER_UNEXPECTED_TOKEN |
400 |
Invalid filter: unexpected token. |
INVALID_DATA_POINT_FILTER_UNEXPECTED_END_OF_INPUT |
400 |
Invalid filter: unexpected end of input. |
INVALID_DATA_POINT_FILTER_EXPRESSION_STRUCTURE |
400 |
Invalid filter expression structure. |
INVALID_DATA_POINT_FILTER_RESTRICTION_COMPARABLE |
400 |
Invalid filter restriction comparable. |
INVALID_DATA_POINT_FILTER_DATA_TYPE_RESTRICTION |
400 |
Invalid filter data type restriction. |
INVALID_TIME_RANGE_INTERVAL_FORMAT |
400 |
Civil time provided for a non-daily rollup request or physical time provided for a daily rollup request. |
INVALID_TIME_RANGE |
400 |
Query end time must be strictly larger than start time. |
INVALID_DATA_POINT_FILTER_MIXED_DATA_TYPE_RESTRICTIONS |
400 |
Filter cannot contain restrictions for multiple data types. |
INVALID_DATA_POINT_FILTER_MIXED_TIME_RESTRICTIONS |
400 |
Filter cannot contain both physical and civil time ranges. |
INVALID_DATA_POINT_FILTER_DATA_TYPE_MEMBER |
400 |
Invalid filter member for data type. |
INVALID_DATA_POINT_FILTER_RESTRICTION_COMPARATOR |
400 |
Invalid filter restriction comparator. |
INVALID_DATA_POINT_FILTER_TIMESTAMP_FORMAT |
400 |
Invalid filter timestamp format. |
INVALID_DATA_POINT_FILTER_CIVIL_DATE_TIME_FORMAT |
400 |
Invalid filter civil date time format. |
INVALID_DATA_POINT_FILTER_RESTRICTION_ARGUMENT |
400 |
Invalid filter restriction argument. |
INVALID_DATA_POINT_FILTER_COLLECTION_MISMATCH |
400 |
Data type in filter does not match parent data type collection. |
INVALID_DATA_POINT_NAME |
400 |
Invalid data point name. |
DATA_POINT_NOT_OWNED_BY_CLIENT |
400 |
Data point is not owned by the client. |
MISSING_DATA_POINT_NAMES |
400 |
Missing data point names. |
MISSING_DATA_POINT_FILTER |
400 |
Filter must be set for purge request. |
DATA_TYPE_MISMATCH |
400 |
The data point in the update request must have the same data type as the parent. |
UPDATE_ONLY_UPSERT_SUPPORTED |
400 |
Update only supports upsert. Please set allow_missing to true. |
MISSING_DATA_POINT_ID |
400 |
Missing data point ID for update. |
MISSING_DATA_POINT_VALUE |
400 |
Missing data point value. |
INVALID_PROFILE_DATA |
400 |
Invalid value provided for field {field}. Provided value: {providedValue}. Accepted values: {acceptedValues}. |
INVALID_FIELD_MASK_DATA |
400 |
Request contains invalid field mask data. |
INVALID_PAGE_SIZE |
400 |
Page size cannot be negative, but was {actualValue}. |
INVALID_PAGE_TOKEN |
400 |
Invalid page token. |
MULTIPLE_DATA_TYPES_UNSUPPORTED |
400 |
Multiple data types are not supported. |
UNSUPPORTED_DATA_TYPE_ACTION |
400 |
The action is not supported for the data type. |
INVALID_DATA_TYPE |
400 |
Invalid data type provided: {dataType}. |
MISSING_SUBSCRIBER |
400 |
Subscriber must be provided. |
INVALID_SUBSCRIBER_NAME |
400 |
Invalid subscriber name: {subscriberName}. |
MISSING_SUBSCRIPTION |
400 |
Subscription must be provided. |
INVALID_SUBSCRIPTION_NAME |
400 |
Invalid subscription name: {subscriptionName}. |
MISSING_DATA_TYPES |
400 |
Data types must be specified. |
DATA_TYPES_CANNOT_BE_EMPTY |
400 |
Data types cannot be empty. If you wish to stop receiving notifications, please use the DeleteSubscription API. |
MISSING_USER |
400 |
User field must be provided. |
INVALID_USER_RESOURCE_NAME |
400 |
Invalid user resource name: {userResourceName}. |
INVALID_DATA_TYPE_FORMAT |
400 |
Data type must be all lowercase: {dataType}. |
MISSING_OAUTH_SCOPE |
403 |
Required OAuth scope(s) are missing for this operation. |
DISALLOWED_OAUTH_SCOPES |
403 |
Request contains disallowed OAuth scope(s): {disallowed_scopes}. Unrecognized scopes present: {unrecognized_scopes_present}. |
API_PRIVATE_PREVIEW_ACCESS_DENIED |
403 |
User is not eligible for the API Private Preview. |
DATA_ACCESS_DENIED |
403 |
Data can't be accessed. |
SLEEP_ALREADY_EXISTS |
409 |
A sleep log with an overlapping interval already exists. |
INTERNAL_ERROR |
500 |
An internal error occurred. |