مراقبة أخطاء ربط الحساب في مشروعك على Google Console
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
تُجري Google طلبات إلى نقاط نهاية OAuth2 أثناء عملية ربط الحساب. ويمكن أن تتعذّر هذه المكالمات لأسباب مختلفة.
يتم تسجيل معلومات تفصيلية عن هذه الأخطاء ويمكنك تتبُّعها في صفحة "مستكشف السجلّات" في مشروعك على Cloud Console.
الفلترة بحثًا عن أخطاء "ربط الحساب"
في صفحة "مستكشف السجلات"، اضبط فلاتر طلبات البحث على ما يلي وانقر على الزر تشغيل طلب البحث:
المورد: اختَر مشروع مهام "مساعد Google" إذا أنشأت المشروع من خلال وحدة تحكّم المهام على Google، وإلا اختَر مشروع Google.
اسم السجلّ: اختَر خيار الخطأ ربط حساب Google.
مستوى الخطورة: اضبطه على خطأ، ويتم تصنيف جميع إدخالات ربط الحساب على أنّها أخطاء.
يمكنك أيضًا الفلترة حسب التاريخ من خلال تعديل النطاق الزمني في أعلى صفحة "مستكشف السجلات"، كما هو موضّح في لقطة الشاشة التالية:
الشكل 1. فلاتر طلبات البحث في "مستكشف السجلات"
يمكنك العثور على مزيد من المعلومات عن كيفية استخدام "مستكشف السجلات" في مستندات "مستكشف السجلات".
محتوى بيانات الخطأ
تتضمّن بيانات خطأ ربط الحساب السمة jsonPayload لإدخال الخطأ. تتضمّن البيانات الحقول التالية:
@type (String): يتم ضبطها دائمًا على type.googleapis.com/google.identity.accountlinking.type.AccountLinkingError.
step (String): خطوة الربط التي حدث فيها الخطأ. اضبطها على إحدى القيم التالية:
ACCOUNT_LINKING_STEP_UNDEFINED: خطوة غير محدّدة
AUTH_CODE_EXCHANGE: خطوة تبادل رمز المصادقة للحصول على رمز الوصول أو رمز إعادة التحميل
REFRESH_ACCESS_TOKEN: خطوة إعادة تحميل رمز الدخول.
TOKEN_REVOCATION: خطوة إبطال رمز مميّز
USERINFO: خطوة جلب معلومات المستخدم باستخدام رمز دخول.
ASSERTION: خطوة إنشاء رابط من خلال التأكيد
response (String, optional): يمثل استجابة HTTP:
status: حالة استجابة HTTP.
body: وصف الخطأ وسلسلة الخطأ
request (String, optional): يمثّل طلب HTTP ويحتوي على مَعلمات طلب HTTP التالية: الطريقة والنص والمعرّف المنتظم للمورد والرؤوس.
الحقلان request وresponse اختياريان لأنّهما يتم فصلهما أحيانًا إلى إدخالَين مختلفَين في عارض السجلّات.
تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eGoogle Assistant account linking errors are logged and can be viewed in the Logs Explorer page in your Google Cloud project.\u003c/p\u003e\n"],["\u003cp\u003eYou can filter these logs by resource type, log name, severity, and date to pinpoint specific issues.\u003c/p\u003e\n"],["\u003cp\u003eError details are found in the \u003ccode\u003ejsonPayload\u003c/code\u003e property, including the linking step, HTTP request/response details, and error type.\u003c/p\u003e\n"],["\u003cp\u003eWhen building your OAuth server, ensure your HTTP response codes align with the Google Account Linking documentation to avoid errors.\u003c/p\u003e\n"]]],[],null,["# Monitor Account Linking errors in your Google Console project\n\nGoogle makes calls to your OAuth2 endpoints during the account linking process. These calls can fail for different reasons.\nDetailed information is logged for these errors and you can monitor them in the [Logs Explorer page](https://console.cloud.google.com/logs/query) of your cloud console project.\n\n### Filtering for Account Linking errors\n\nIn the [Logs Explorer page](https://console.cloud.google.com/logs/query), set the query filters to the following and click the **Run Query** button:\n\n- **Resource** : Select **Google Assistant Action Project** if you created the project through [Actions on Google Console](https://console.actions.google.com/); otherwise select the **Google Project** option.\n- **Log Name** : Select the **Google Account Linking** Error option.\n- **Severity** : Set to *error*; all account linking entries are categorized as errors.\n\nYou can also filter by date by updating the time range at the top of the Logs Explorer page, as shown in the following screenshot:\n\n\u003cbr /\u003e\n\n**Figure 1**. Logs Explorer query filters\n\n\u003cbr /\u003e\n\nYou can find more information on how to use the Logs Explorer in the [Logs Explorer documentation](https://cloud.google.com/logging/docs/view/logs-viewer-preview).\n\n### Content of the error data\n\nThe account linking error data are contained in the `jsonPayload` property of the error entry. The data includes the following fields:\n\n- `@type` (`String`): Always set to `type.googleapis.com/google.identity.accountlinking.type.AccountLinkingError`.\n- `step` (`String`): The linking step at which the error occurred. Set to one of these values:\n - `ACCOUNT_LINKING_STEP_UNDEFINED`: An undefined step.\n - `AUTH_CODE_EXCHANGE`: The step to exchange auth code for access or refresh token.\n - `REFRESH_ACCESS_TOKEN`: The step to refresh an access token.\n - `TOKEN_REVOCATION`: The step to revoke a token.\n - `USERINFO`: The step to fetch user information with an access token.\n - `ASSERTION`: The step to create a link by assertion.\n- `response` (`String, optional`): Represents an HTTP response:\n - `status`: The status of the HTTP response.\n - `body`: The error description and the error string.\n- `request` (`String, optional`): Represents an HTTP request and contains the following HTTP request parameters: method, body, URI, and headers.\n\nThe `request` and `response` fields are optional because they are sometimes separated into 2 different entries in the log viewer.\n\nWhen implementing your [Google Account Linking OAuth server](https://developers.google.com/identity/account-linking/oauth-linking?oauth=code#implement_your_oauth_server) and the [Streamlined Google Account Linking OAuth server](https://developers.google.com/identity/account-linking/oauth-with-sign-in-linking#implement_your_oauth_server), you are required to use specific HTTP response codes for different states. The values you return must correspond to the correct state listed in the documentation.\n| **Note:** See the [HTTP status code definitions](https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html) for more information on possible response codes and definitions."]]