WebResource
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
WebResource คือตัวแทนของเว็บไซต์หรือโดเมนที่ได้รับการยืนยัน
โดยมีรหัส Canonical ของเว็บไซต์หรือโดเมน, URL หรือชื่อโดเมน และรายชื่อเจ้าของ โปรดทราบว่ารายการเจ้าของจะมีผู้ใช้ที่ตรวจสอบสิทธิ์แล้วเสมอ เนื่องจากผู้ใช้ที่สามารถเข้าถึง WebResource ได้คือผู้ใช้ที่ตรวจสอบสิทธิ์แล้วซึ่งเป็นเจ้าของเว็บไซต์หรือโดเมนดังกล่าวเท่านั้น
ดูรายการเมธอดสำหรับทรัพยากรนี้ได้ที่ส่วนท้ายของหน้านี้
การนำเสนอแหล่งข้อมูล
{
"id": string,
"site": {
"type": string,
"identifier": string
},
"owners": [
string
]
}
ชื่อพร็อพเพอร์ตี้ |
ค่า |
คำอธิบาย |
หมายเหตุ |
id |
string |
สตริงที่ใช้ระบุเว็บไซต์นี้ ควรใช้ค่านี้ในส่วน id ของ REST URL สำหรับการดำเนินการ get, update และ delete |
|
owners[] |
list |
อีเมลของเจ้าของโดยตรงที่ได้รับการยืนยันทั้งหมดของพร็อพเพอร์ตี้นี้ เจ้าของโดยอ้อม เช่น เจ้าของที่ได้รับการยืนยันของโดเมนที่มีโดเมนอยู่ จะไม่รวมอยู่ในรายการนี้ |
|
site |
object |
คอนเทนเนอร์สำหรับที่อยู่และประเภทของเว็บไซต์ที่ได้รับการยืนยันหรือจะได้รับการยืนยัน |
|
site.identifier |
string |
ตัวระบุเว็บไซต์ ซึ่งจะมีรูปแบบแตกต่างกันไปตามค่าของพร็อพเพอร์ตี้ type |
|
site.type |
string |
ประเภทเว็บไซต์
ค่าที่ยอมรับได้ มีดังนี้
- "
ANDROID_APP ": ตั้งค่า identifier เป็น URL ของแอป Android Example: "android-app://com.google.android.youtube/"
- "
INET_DOMAIN ": ตั้งค่า identifier เป็นชื่อโดเมน เช่น "www.example.com", "example.com" หรือ "subdomain.example.com"
- "
SITE ": ตั้ง identifier เป็น URL ที่สมบูรณ์ในตัวเองของรากของเว็บไซต์ และลงท้ายด้วยเครื่องหมาย / Examples: "https://www.example.com/" หรือ "https://www.example.com/subsite/"
|
|
เมธอด
ใช้วิธีการ insert เพื่อยืนยันการเป็นเจ้าของเว็บไซต์หรือโดเมนของผู้ใช้ที่ผ่านการตรวจสอบสิทธิ์ ใช้วิธีการรับ, อัปเดต, , ลบเพื่อเรียกข้อมูลหรือแก้ไขทรัพยากรที่ได้รับการยืนยันสำหรับผู้ใช้ที่ตรวจสอบสิทธิ์แล้ว
คุณจะดูทรัพยากรที่ได้รับการยืนยันทั้งหมดสำหรับผู้ใช้ที่ตรวจสอบสิทธิ์แล้วได้จากรายการ และจะรับโทเค็นเพื่อวางในเว็บไซต์ของผู้ใช้ที่ตรวจสอบสิทธิ์แล้วได้ด้วย getToken
- ลบ
- ยืนยันการเป็นเจ้าของเว็บไซต์หรือโดเมนของผู้ใช้
- รับ
- เรียกข้อมูลล่าสุดของเว็บไซต์หรือโดเมน
- getToken
- รับโทเค็นการยืนยันสำหรับผู้ใช้ที่ตรวจสอบสิทธิ์แล้วเพื่อวางในเว็บไซต์หรือโดเมน
- แทรก
- ยืนยันการเป็นเจ้าของเว็บไซต์หรือโดเมน
- list
- รับรายการเว็บไซต์และโดเมนที่ยืนยันแล้วของผู้ใช้ที่ผ่านการตรวจสอบสิทธิ์
- อัปเดต
- แก้ไขรายชื่อเจ้าของเว็บไซต์หรือโดเมน
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 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."]]