This guide explains how to troubleshoot common issues when using the Google Health API.
4xx client errors
4xx status codes are returned when a problem exists in the client app code. Look at the response body elements for more information about the problem.
400 bad request
| Message | Description | Recommendation |
|---|---|---|
| Request contains an invalid argument. | The data type ID {value} is not supported. | Verify the data type being referenced is supported by the endpoint. |
| Invalid JSON payload received. Octal/hex numbers are not valid JSON values. | The dailyRollUp endpoint does not support month and day values
represented as MM or DD, respectfully. Single digits shouldn't have
a leading 0 (zero). |
404 not found
| Message | Description | Recommendation |
|---|---|---|
The requested URL
/v4/users/me/dataTypes/{dataType}/dataPoints
was not found on this server. |
Possible causes:
|
Retrieve a Fitbit user ID
To help troubleshoot a user issue, you may need to verify the Google Account of the user logged into the Fitbit mobile app.
To find the Fitbit user ID:
- Open the Fitbit mobile app.
- Press the You icon in the bottom right hand corner.
- Press the Edit profile link in the top tile containing the user's name and joined date.
- Go to the bottom of the page. In the section Your account, the value assigned to the ID is the Fitbit user ID. (For example: CV5TKH)
Revoke consent to an app
When helping a user troubleshoot their OAuth2 connection to your app, you may need them to unlink their account from your app and then complete your authorization flow again.
To unlink their Google Account from your app:
- Open the Fitbit mobile app.
- Press the Fitbit user profile icon in the upper right corner.
- Press Manage your Google Account.
- Select the tile Data & privacy.
- Go down to the section **Data from apps and services you use. Under Apps and services, select Third-party apps & services.
- Look for your app name in the list of connected apps, and have the user select it.
- Press Delete all connections you have with <app name>.
- Have the user press confirm to revoke consent to your app.
When the revoke process completes, the user will be taken back to the list of Third-party apps & services page. The user might need to refresh the page to see the app name removed from the list.