WebResource
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.
WebResource là nội dung đại diện cho một trang web hoặc miền đã xác minh.
Trang này chứa mã nhận dạng chính tắc của một trang web hoặc miền, URL hoặc tên miền và danh sách chủ sở hữu. Xin lưu ý rằng danh sách chủ sở hữu luôn bao gồm người dùng đã xác thực, vì chỉ những người có thể truy cập vào WebResource là những người dùng đã xác thực, đồng thời là chủ sở hữu của trang web hoặc miền đó.
Để biết danh sách các phương thức cho tài nguyên này, hãy xem ở cuối trang.
Biểu diễn tài nguyên
{
"id": string,
"site": {
"type": string,
"identifier": string
},
"owners": [
string
]
}
Tên tài sản |
Giá trị |
Mô tả |
Ghi chú |
id |
string |
Chuỗi được dùng để nhận dạng trang web này. Giá trị này phải được dùng trong phần id của URL REST cho các thao tác get, update (cập nhật) và delete. |
|
owners[] |
list |
Địa chỉ email của tất cả chủ sở hữu trực tiếp và đã được xác minh của tài sản này. Chủ sở hữu gián tiếp (ví dụ: chủ sở hữu đã xác minh của miền chứa) không có trong danh sách này. |
|
site |
object |
Vùng chứa địa chỉ và loại trang web đã được xác minh hoặc sẽ được xác minh. |
|
site.identifier |
string |
Mã nhận dạng trang web có nhiều dạng khác nhau tuỳ thuộc vào giá trị của thuộc tính type . |
|
site.type |
string |
Loại trang web.
Các giá trị được chấp nhận là:
- "
ANDROID_APP ": Đặt identifier thành URL ứng dụng Android. Example: "android-app://com.google.android.youtube/"
- "
INET_DOMAIN ": Đặt identifier thành tên miền. Ví dụ: "www.example.com", "example.com" hoặc "subdomain.example.com"
- "
SITE ": Đặt identifier thành một URL đủ điều kiện cho thư mục gốc của trang web, kết thúc bằng dấu /. Examples: "https://www.example.com/" hoặc "https://www.example.com/subsite/"
|
|
Phương thức
Sử dụng phương thức chèn để xác minh quyền sở hữu trang web hoặc miền của người dùng đã xác thực. Sử dụng các phương thức get, update, , delete để truy xuất hoặc sửa đổi tài nguyên đã được xác minh cho người dùng đã xác thực.
Bạn có thể xem tất cả tài nguyên đã xác minh cho người dùng đã xác thực qua danh sách và có thể lấy mã thông báo để đưa vào trang web của người dùng đã xác thực bằng getToken.
- xóa
- Hợp nhất quyền sở hữu của người dùng đối với một trang web hoặc miền.
- nhận
- Truy xuất dữ liệu mới nhất của một trang web hoặc miền.
- getToken
- Lấy mã xác minh để người dùng đã xác thực đặt trên một trang web hoặc miền.
- chèn
- Xác minh quyền sở hữu một trang web hoặc miền.
- list
- Lấy danh sách các miền và trang web đã xác minh của người dùng đã xác thực.
- cập nhật
- Sửa đổi danh sách chủ sở hữu cho trang web hoặc miền.
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-25 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[[["\u003cp\u003eA WebResource represents a verified website or domain and includes its ID, URL/domain, and a list of owners, which always includes the authenticated user.\u003c/p\u003e\n"],["\u003cp\u003eYou can verify ownership, retrieve, update, and delete WebResources using the provided methods.\u003c/p\u003e\n"],["\u003cp\u003eWebResource data includes an ID, owner list, and site information containing the identifier and type (e.g., website, Android app, domain).\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003esite.identifier\u003c/code\u003e can be a domain name, a URL, or an Android app URL depending on the \u003ccode\u003esite.type\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eSeveral methods are available to manage WebResources, including inserting (verifying ownership), retrieving data, updating owner lists, deleting, listing all verified resources, and getting a verification token.\u003c/p\u003e\n"]]],["A WebResource represents a verified website or domain, identified by an `id`, `site` (type and identifier), and a list of `owners`, which always includes the authenticated user. Key actions include using `insert` to verify ownership, `get`, `update`, and `delete` to manage existing resources, `list` to view verified sites, and `getToken` to obtain a verification token. Site `type` can be `ANDROID_APP`, `INET_DOMAIN`, or `SITE`, with corresponding identifier formats.\n"],null,["# WebResource\n\n\u003cbr /\u003e\n\nA WebResource is a representation of a verified website or domain.\n\n\u003cbr /\u003e\n\nIt contains the canonical ID of a site or domain, the URL or domain name, and a list of owners. Note that the owners list always includes the authenticated user, because the only people who can access a WebResource are authenticated users who are owners of that site or domain.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nFor a list of [methods](#methods) for this resource, see the end of this page.\n\nResource representations\n------------------------\n\n\u003cbr /\u003e\n\n```carbon\n{\n \"id\": string,\n \"site\": {\n \"type\": string,\n \"identifier\": string\n },\n \"owners\": [\n string\n ]\n}\n```\n\n| Property name | Value | Description | Notes |\n|-------------------|----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------|\n| `id` | `string` | The string used to identify this site. This value should be used in the \u003cvar class=\"apiparam\" translate=\"no\"\u003eid\u003c/var\u003e portion of the REST URL for the [get](/site-verification/v1/webResource/get), [update](/site-verification/v1/webResource/update), and [delete](/site-verification/v1/webResource/delete) operations. | |\n| `owners[]` | `list` | The email addresses of all direct, verified owners of this exact property. Indirect owners---for example verified owners of the containing domain---are not included in this list. | |\n| `site` | `object` | Container for the address and type of a site that is verified or will be verified. | |\n| site.`identifier` | `string` | The site identifier, which takes different forms depending on the value of the `type` property. | |\n| site.`type` | `string` | The site type. \u003cbr /\u003e Acceptable values are: - \"`ANDROID_APP`\": Set `identifier` to an Android app URL. **Example:** \"android-app://com.google.android.youtube/\" - \"`INET_DOMAIN`\": Set `identifier` to a domain name. **Examples:** \"www.example.com\", \"example.com\" or \"subdomain.example.com\" - \"`SITE`\": Set `identifier` to a fully-qualified URL for your site root, ending in a / mark. **Examples:** \"https://www.example.com/\" or \"https://www.example.com/subsite/\" | |\n\nMethods\n-------\n\n\u003cbr /\u003e\n\nUse the [insert](/site-verification/v1/webResource/insert) method to verify the authenticated user's ownership of a website or domain. Use the [get](/site-verification/v1/webResource/get), [update](/site-verification/v1/webResource/update), and [delete](/site-verification/v1/webResource/delete) methods to retrieve or modify a resource that has already been verified for the authenticated user.\n\nYou can see all verified resources for the authenticated user with [list](/site-verification/v1/webResource/list), and you can get a token to place on the authenticated user's site with [getToken](/site-verification/v1/webResource/getToken).\n\n\u003cbr /\u003e\n\n[delete](/site-verification/v1/webResource/delete)\n: Unverifies the user's ownership of a website or domain.\n\n[get](/site-verification/v1/webResource/get)\n: Retrieves the most current data for a website or domain.\n\n[getToken](/site-verification/v1/webResource/getToken)\n: Gets a verification token for the authenticated user to place on a website or domain.\n\n[insert](/site-verification/v1/webResource/insert)\n: Verifies ownership of a website or domain.\n\n[list](/site-verification/v1/webResource/list)\n: Gets the list of the authenticated user's verified websites and domains.\n\n[update](/site-verification/v1/webResource/update)\n: Modifies the list of owners for a website or domain."]]