所有讀取及寫入使用者資料的 Google Health API 端點,都必須透過一或多個範圍取得使用者同意,才能收集資料。應用程式呼叫 Google 的 OAuth2 授權端點時,必須提供範圍清單。請參閱「取得 OAuth2 存取權杖」。核發的存取權杖只會包含同意授權的使用者授權的範圍。
所有 Google Health API 範圍都以以下內容開頭:
https://www.googleapis.com/auth/googlehealth
可用範圍
| 範圍 | 權限 |
|---|---|
| .activity_and_fitness | 將活動和健身資料新增至 Fitbit 應用程式、編輯及刪除其新增的資料,以及查看您的 Fitbit 活動和健身資料。 |
| .activity_and_fitness.readonly | 查看你的 Fitbit 活動和健身資料。 |
| .health_metrics_and_measurements | 將健康指標和測量資料新增至 Fitbit 應用程式、編輯及刪除其新增的資料,以及查看您的 Fitbit 健康指標和測量資料。 |
| .health_metrics_and_measurements.readonly | 查看您的 Fitbit 健康指標和測量資料。 |
| .location.readonly | 查看您運動期間記錄的 Fitbit GPS 位置資訊。 |
| .nutrition | 將營養資料新增至 Fitbit 應用程式、編輯及刪除其新增的資料,以及查看您的 Fitbit 營養資料。 |
| .nutrition.readonly | 查看 Fitbit 營養資料。 |
| .profile | 將設定檔資料新增至 Fitbit 應用程式、編輯及刪除其新增的資料,以及查看您的 Fitbit 設定檔資料。 |
| .profile.readonly | 查看你的 Fitbit 設定檔資料。 |
| .settings | 將設定資料新增至 Fitbit 應用程式、編輯及刪除其新增的資料,以及查看您的 Fitbit 應用程式設定資料。 |
| .settings.readonly | 查看 Fitbit 設定。 |
| .sleep | 將睡眠資料新增至 Fitbit 應用程式、編輯及刪除其新增的資料,以及查看您的 Fitbit 睡眠資料。 |
| .sleep.readonly | 查看 Fitbit 睡眠資料。 |