AccountLinking
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Liên kết tài khoản cho phép Google hướng dẫn người dùng đăng nhập vào các dịch vụ web của Ứng dụng.
Đối với các loại liên kết Đăng nhập bằng Google và OAuth + Đăng nhập bằng Google, Google sẽ tạo một mã ứng dụng khách để nhận dạng Ứng dụng của bạn với Google ("Mã ứng dụng khách do Google cấp cho Hành động của bạn" trên giao diện người dùng Console). Trường này ở chế độ chỉ đọc và có thể kiểm tra được bằng cách chuyển đến trang Liên kết tài khoản trong giao diện người dùng Console. Hãy xem bài viết: https://developers.google.com/assistant/identity/google-sign-in
Lưu ý: Đối với tất cả các loại chế độ cài đặt liên kết tài khoản (ngoại trừ chế độ Đăng nhập bằng Google), bạn phải cung cấp tên người dùng và mật khẩu cho tài khoản thử nghiệm trong phần Settings.testing_instructions để nhóm đánh giá xem xét ứng dụng (các thông tin này sẽ không hiển thị cho người dùng).
Trình bày theo YAML |
enableAccountCreation: boolean
linkingType: enum (LinkingType )
authGrantType: enum (AuthGrantType )
appClientId: string
authorizationUrl: string
tokenUrl: string
scopes:
- string
learnMoreUrl: string
useBasicAuthHeader: boolean |
Trường |
enableAccountCreation |
boolean
Bắt buộc. Nếu là true , người dùng sẽ được phép đăng ký tài khoản mới thông qua giọng nói. Nếu giá trị trả về là false , bạn chỉ được phép tạo tài khoản trên trang web của mình. Chọn tùy chọn này nếu bạn muốn hiển thị điều khoản dịch vụ của mình hoặc có được sự đồng ý của người dùng trong khi đăng ký. linkingType không được là GOOGLE_SIGN_IN khi đây là false . linkingType không được là OAUTH khi là true .
|
linkingType |
enum (LinkingType )
Bắt buộc. Loại liên kết để sử dụng. Hãy truy cập vào https://developers.google.com/assistant/identity để biết thêm thông tin chi tiết về các loại liên kết.
|
authGrantType |
enum (AuthGrantType )
Không bắt buộc. Cho biết loại xác thực cho OAUTH linkingType.
|
appClientId |
string
Không bắt buộc. Mã ứng dụng khách do Ứng dụng của bạn cấp cho Google. Đây là mã ứng dụng OAuth2 giúp nhận dạng Google cho dịch vụ của bạn. Chỉ được đặt khi dùng OAuth.
|
authorizationUrl |
string
Không bắt buộc. Điểm cuối cho trang web đăng nhập có hỗ trợ mã OAuth2 hoặc các luồng ngầm ẩn. URL phải sử dụng HTTPS. Chỉ được đặt khi dùng OAuth.
|
tokenUrl |
string
Không bắt buộc. Điểm cuối OAuth2 để trao đổi mã thông báo. URL phải sử dụng HTTPS. Tuỳ chọn này không được thiết lập khi chỉ sử dụng OAuth với sự cấp phép IMPLICIT làm loại liên kết. Chỉ được đặt khi dùng OAuth.
|
scopes[] |
string
Không bắt buộc. Danh sách các quyền mà người dùng phải đồng ý để sử dụng dịch vụ của bạn. Chỉ được đặt khi dùng OAuth. Đảm bảo cung cấp Điều khoản dịch vụ trong thông tin thư mục trong phần LocalizedSettings.terms_of_service_url nếu bạn chỉ định trường này.
|
learnMoreUrl |
string
Không bắt buộc. Đây là trang web trên dịch vụ của bạn, mô tả các quyền mà người dùng đang cấp cho Google. Chỉ thiết lập nếu bạn sử dụng OAuth và Đăng nhập bằng Google. Đảm bảo cung cấp Điều khoản dịch vụ trong thông tin thư mục trong phần LocalizedSettings.terms_of_service_url nếu bạn chỉ định trường này.
|
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 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. |"]]