AccountLinking
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
AccountLinking به Google اجازه می دهد تا کاربر را برای ورود به سرویس های وب برنامه راهنمایی کند.
برای انواع پیوند Google Sign In و OAuth + Google Sign In، Google یک شناسه سرویس گیرنده ایجاد می کند که برنامه شما را به Google شناسایی می کند («شناسه مشتری صادر شده توسط Google برای اقدامات شما» در رابط کاربری کنسول). این فیلد فقط خواندنی است و با رفتن به صفحه پیوند دادن حساب رابط کاربری Console قابل بررسی است. ببینید: https://developers.google.com/assistant/identity/google-sign-in
توجه: برای همه انواع تنظیمات پیوند حساب (به جز برای ورود به سیستم Google)، باید یک نام کاربری و رمز عبور برای یک حساب آزمایشی در Settings.testing_instructions ارائه دهید تا تیم بازبینی برنامه را بررسی کند (برای کاربران قابل مشاهده نخواهند بود).
نمایندگی YAML |
---|
enableAccountCreation: boolean
linkingType: enum (LinkingType )
authGrantType: enum (AuthGrantType )
appClientId: string
authorizationUrl: string
tokenUrl: string
scopes:
- string
learnMoreUrl: string
useBasicAuthHeader: boolean |
فیلدها |
---|
enableAccountCreation | boolean مورد نیاز. در صورت true ، کاربران مجاز به ثبت نام برای حساب های جدید از طریق صدا هستند. اگر false باشد، ایجاد حساب فقط در وب سایت شما مجاز است. اگر می خواهید شرایط خدمات خود را نمایش دهید یا رضایت کاربر را در حین ثبت نام دریافت کنید، این گزینه را انتخاب کنید. وقتی این false است، linkingType نمیتواند GOOGLE_SIGN_IN باشد. وقتی این true است linkingType نمی تواند OAUTH باشد. |
linkingType | enum ( LinkingType ) مورد نیاز. نوع پیوند مورد استفاده برای جزئیات بیشتر در مورد انواع پیوند، به https://developers.google.com/assistant/identity مراجعه کنید. |
authGrantType | enum ( AuthGrantType ) اختیاری. نوع احراز هویت را برای OAUTH linkingType نشان می دهد. |
appClientId | string اختیاری. شناسه مشتری صادر شده توسط برنامه شما برای Google. این شناسه مشتری OAuth2 است که Google را در سرویس شما شناسایی می کند. فقط هنگام استفاده از OAuth تنظیم شود. |
authorizationUrl | string اختیاری. نقطه پایانی برای صفحه وب ورود به سیستم شما که از کد OAuth2 یا جریان های ضمنی پشتیبانی می کند. URL باید از HTTPS استفاده کند. فقط هنگام استفاده از OAuth تنظیم شود. |
tokenUrl | string اختیاری. نقطه پایانی OAuth2 برای تبادل توکن. URL باید از HTTPS استفاده کند. زمانی که فقط از OAuth با اعطای IMPLICIT به عنوان نوع پیوند استفاده می شود، این تنظیم تنظیم نمی شود. فقط هنگام استفاده از OAuth تنظیم شود. |
scopes[] | string اختیاری. فهرست مجوزهایی که کاربر برای استفاده از خدمات شما باید با آنها موافقت کند. فقط هنگام استفاده از OAuth تنظیم شود. در صورت مشخص کردن این فیلد، مطمئن شوید که شرایط خدمات را در اطلاعات دایرکتوری در بخش LocalizedSettings.terms_of_service_url ارائه دهید. |
learnMoreUrl | string اختیاری. این صفحه وب در سرویس شما است که مجوزهایی را که کاربر به Google اعطا می کند، توضیح می دهد. فقط در صورت استفاده از OAuth و Google Sign In تنظیم کنید. در صورت مشخص کردن این فیلد، مطمئن شوید که شرایط خدمات را در اطلاعات دایرکتوری در بخش LocalizedSettings.terms_of_service_url ارائه دهید. |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eAccount Linking enables users to sign in to your app's web services through Google.\u003c/p\u003e\n"],["\u003cp\u003eFor Google Sign-In and OAuth linking, a Client ID is generated by Google and displayed in the Actions Console.\u003c/p\u003e\n"],["\u003cp\u003eFor all other linking types, provide test account credentials for review purposes in \u003ccode\u003eSettings.testing_instructions\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eYou must configure account linking settings like \u003ccode\u003eenableAccountCreation\u003c/code\u003e, \u003ccode\u003elinkingType\u003c/code\u003e, and optional OAuth parameters in your action's YAML configuration.\u003c/p\u003e\n"],["\u003cp\u003eWhen using OAuth, provide necessary information like authorization and token URLs, scopes, and optionally, a \u003ccode\u003elearnMoreUrl\u003c/code\u003e and basic authentication settings.\u003c/p\u003e\n"]]],["Account linking enables Google to guide users to sign in to an app's web services. For certain linking types, Google provides a read-only Client ID. Settings require a test account's username and password, except with Google Sign In. The YAML representation defines fields like `enableAccountCreation`, `linkingType`, `authGrantType`, and URLs for authorization and token exchange. OAuth requires specifying `appClientId`, `scopes`, and possibly `learnMoreUrl` and `useBasicAuthHeader`. The `enableAccountCreation` boolean determines if account creation is done via voice.\n"],null,["# AccountLinking\n\n- [YAML representation](#SCHEMA_REPRESENTATION)\n\nAccountLinking allows Google to guide the user to sign-in to the App's web services.\n\nFor Google Sign In and OAuth + Google Sign In linking types, Google generates a client ID identifying your App to Google (\"Client ID issued by Google to your Actions\" on Console UI). This field is read-only and can be checked by navigating to the Console UI's Account Linking page. See: \u003chttps://developers.google.com/assistant/identity/google-sign-in\u003e\n\nNote: For all account linking setting types (except for Google Sign In), you must provide a username and password for a test account in Settings.testing_instructions for the review team to review the app (they will not be visible to users).\n\n| YAML representation ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ``` enableAccountCreation: boolean linkingType: enum (/assistant/actionssdk/reference/rest/Shared.Types/LinkingType) authGrantType: enum (/assistant/actionssdk/reference/rest/Shared.Types/AuthGrantType) appClientId: string authorizationUrl: string tokenUrl: string scopes: - string learnMoreUrl: string useBasicAuthHeader: boolean ``` |\n\n| Fields ||\n|-------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `enableAccountCreation` | `boolean` Required. If `true`, users are allowed to sign up for new accounts via voice. If `false`, account creation is only allowed on your website. Select this option if you want to display your terms of service or obtain user consents during sign-up. linkingType cannot be GOOGLE_SIGN_IN when this is `false`. linkingType cannot be OAUTH when this is `true`. |\n| `linkingType` | `enum (`[LinkingType](/assistant/actionssdk/reference/rest/Shared.Types/LinkingType)`)` Required. The linking type to use. See \u003chttps://developers.google.com/assistant/identity\u003e for further details on the linking types. |\n| `authGrantType` | `enum (`[AuthGrantType](/assistant/actionssdk/reference/rest/Shared.Types/AuthGrantType)`)` Optional. Indicates the type of authentication for OAUTH linkingType. |\n| `appClientId` | `string` Optional. Client ID issued by your App to Google. This is the OAuth2 Client ID identifying Google to your service. Only set when using OAuth. |\n| `authorizationUrl` | `string` Optional. Endpoint for your sign-in web page that supports OAuth2 code or implicit flows. URL must use HTTPS. Only set when using OAuth. |\n| `tokenUrl` | `string` Optional. OAuth2 endpoint for token exchange. URL must use HTTPS. This is not set when only using OAuth with IMPLICIT grant as the linking type. Only set when using OAuth. |\n| `scopes[]` | `string` Optional. List of permissions the user must consent to in order to use your service. Only set when using OAuth. Make sure to provide a Terms of Service in the directory information in LocalizedSettings.terms_of_service_url section if specifying this field. |\n| `learnMoreUrl` | `string` Optional. This is the web page on your service which describes the permissions the user is granting to Google. Only set if using OAuth and Google Sign In. Make sure to provide a Terms of Service in the directory information in LocalizedSettings.terms_of_service_url section if specifying this field. |\n| `useBasicAuthHeader` | `boolean` Optional. If true, allow Google to transmit client ID and secret via HTTP basic auth header. Otherwise, Google uses the client ID and secret inside the post body. Only set when using OAuth. Make sure to provide a Terms of Service in the directory information in LocalizedSettings.terms_of_service_url section if specifying this field. |"]]