عیب یابی

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 با برنامه موافقت کند. برای رفع این خطا:
  1. Sign out of the Fitbit mobile app through the Fitbit settings.
  2. با فشار دادن دکمه «ادامه با گوگل» یا «ورود با گوگل» وارد برنامه موبایل Fitbit شوید. اگر پیامی با عنوان «نمی‌توانید از Fitbit با این حساب گوگل استفاده کنید» دریافت کردید، آدرس ایمیل شما هنوز به عنوان یک حساب کاربری قدیمی Fitbit ثبت شده است. برای انتقال حساب خود، مراحل این مقاله راهنما را دنبال کنید.
  3. If you successfully sign into the Fitbit mobile app with your new Google Account, try consenting again using the same email address.

۴۰۴ یافت نشد

پیام توضیحات توصیه
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:

  1. برنامه موبایل Fitbit را باز کنید.
  2. Press the You icon in the bottom right hand corner.
  3. Press the Edit profile link in the top tile containing the user's name and joined date.
  4. 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.

برای لغو اتصال حساب گوگل آنها از برنامه شما:

  1. برنامه موبایل Fitbit را باز کنید.
  2. Press the Fitbit user profile icon in the upper right corner.
  3. مدیریت حساب گوگل خود را فشار دهید.
  4. کاشی «داده‌ها و حریم خصوصی» را انتخاب کنید.
  5. Go down to the section **Data from apps and services you use. Under Apps and services , select Third-party apps & services .
  6. Look for your app name in the list of connected apps, and have the user select it.
  7. Press Delete all connections you have with <app name> .
  8. Have the user press confirm to revoke consent to your app.

پس از اتمام فرآیند لغو، کاربر به صفحه فهرست برنامه‌ها و سرویس‌های شخص ثالث بازگردانده می‌شود. ممکن است کاربر برای مشاهده حذف نام برنامه از فهرست، نیاز به رفرش صفحه داشته باشد.