我试图通过rest api在google的数据上写入数据。我们的想法是在google的rest api上写入数据,目标是显示google fit和web上的信息。
我试图写的信息是一个会话(等于锻炼)
请求: 获取https://www.googleapis.com/fitness/v1/users/me/sessions/11xxxx
体:
{
"id": "11xxxx",
"name": "My example workout",
"description": "A very intense workout",
"startTimeMillis": 1396710000000,
"endTimeMillis": 1396713600000,
"version": 1,
"lastModifiedToken": "exampleToken",
"application": {
"packageName": "com.google.android.apps.fitness",
"version": "web"
},
"activityType": 1
}
响应:
{
"error": {
"code": 403,
"message": "Application package name (com.google.android.apps.fitness) provided by un-trusted source.",
"errors": [
{
"domain": "global",
"message": "Application package name (com.google.android.apps.fitness) provided by un-trusted source.",
"reason": "forbidden"
}
]
}
}