AccountLinking
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
การลิงก์บัญชีทำให้ Google แนะนำผู้ใช้ในการลงชื่อเข้าใช้บริการบนเว็บของแอปได้
สําหรับประเภทการลิงก์ Google Sign-In และ OAuth + Google Sign-In นั้น Google จะสร้างรหัสไคลเอ็นต์ที่ระบุแอปของคุณให้กับ Google ("รหัสไคลเอ็นต์ที่ Google ออกให้กับการดำเนินการของคุณ" ใน UI ของคอนโซล) ช่องนี้เป็นแบบอ่านอย่างเดียวและจะตรวจสอบได้โดยไปที่หน้าการลิงก์บัญชีของ Console UI ดูที่ https://developers.google.com/assistant/identity/google-sign-in
หมายเหตุ: สำหรับการตั้งค่าการลิงก์บัญชีทุกประเภท (ยกเว้น Google Sign-In) คุณต้องระบุชื่อผู้ใช้และรหัสผ่านของบัญชีทดสอบใน 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 คุณจะสร้างบัญชีได้เฉพาะในเว็บไซต์ของคุณเท่านั้น เลือกตัวเลือกนี้หากคุณต้องการแสดงข้อกำหนดในการให้บริการหรือขอรับความยินยอมจากผู้ใช้ในระหว่างการลงชื่อสมัครใช้ linkType จะเป็น GOOGLE_SIGN_IN ไม่ได้เมื่อเป็น false linkType จะเป็น OAUTH ไม่ได้เมื่อเป็น true
|
linkingType |
enum (LinkingType )
ต้องระบุ ประเภทการลิงก์ที่จะใช้ ดูรายละเอียดเพิ่มเติมเกี่ยวกับประเภทการลิงก์ได้ที่ https://developers.google.com/assistant/identity
|
authGrantType |
enum (AuthGrantType )
ไม่บังคับ ระบุประเภทของการตรวจสอบสิทธิ์สำหรับ linkingType ของ OAUTH
|
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 หากมีการระบุช่องนี้
|
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\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. |"]]