This guide explains how to troubleshoot common issues when using the Google Health API.
خطاهای کلاینت 4xx
کدهای وضعیت 4xx زمانی بازگردانده میشوند که مشکلی در کد برنامه کلاینت وجود داشته باشد. برای اطلاعات بیشتر در مورد مشکل، به عناصر بدنه پاسخ مراجعه کنید.
درخواست بد ۴۰۰
| پیام | توضیحات | توصیه |
|---|---|---|
| درخواست شامل یک آرگومان نامعتبر است. | نوع دادهی ID {value} پشتیبانی نمیشود. | 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). |
۴۰۱ غیرمجاز
| پیام | توضیحات | توصیه |
|---|---|---|
| Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. | INVALID_AUTHENTICATOR: توکن منقضی شده است | Your access token has expired. Use the refresh token to obtain a new access token & refresh token, or the user should re-consent to the application. |
۴۰۳ ممنوعه
| پیام | توضیحات | توصیه |
|---|---|---|
| تماس گیرنده مجوز ندارد. | نتونستم از GaiaMint، اوبرمینت (UberMint) سکه بزنم. | کاربر توانست جریان مجوز را تکمیل کند، اما فراخوانی نقطه پایانی ناموفق بود. این میتواند زمانی رخ دهد که یک حساب کاربری قدیمی Fitbit به جای یک حساب Google با برنامه موافقت کند. برای رفع این خطا:
|
۴۰۴ یافت نشد
| پیام | توضیحات | توصیه |
|---|---|---|
The requested URL /v4/users/me/dataTypes/{dataType}/dataPoints was not found on this server. | علل احتمالی:
|
بازیابی شناسه کاربری Fitbit
To help troubleshoot a user issue, you may need to verify the Google Account of the user logged into the Fitbit mobile app.
برای پیدا کردن شناسه کاربری Fitbit:
- برنامه موبایل Fitbit را باز کنید.
- 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)
لغو رضایت برای یک برنامه
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.
برای لغو اتصال حساب گوگل آنها از برنامه شما:
- برنامه موبایل Fitbit را باز کنید.
- Press the Fitbit user profile icon in the upper right corner.
- مدیریت حساب گوگل خود را فشار دهید.
- کاشی «دادهها و حریم خصوصی» را انتخاب کنید.
- 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.
پس از اتمام فرآیند لغو، کاربر به صفحه فهرست برنامهها و سرویسهای شخص ثالث بازگردانده میشود. ممکن است کاربر برای مشاهده حذف نام برنامه از فهرست، نیاز به رفرش صفحه داشته باشد.