WebResource
Stay organized with collections
Save and categorize content based on your preferences.
A WebResource is a representation of a verified website or domain.
It 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.
For a list of methods for this resource, see the end of this page.
Resource representations
{
"id": string,
"site": {
"type": string,
"identifier": string
},
"owners": [
string
]
}
Property name |
Value |
Description |
Notes |
id |
string |
The string used to identify this site. This value should be used in the id portion of the REST URL for the get, update, and delete operations. |
|
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. |
|
site |
object |
Container for the address and type of a site that is verified or will be verified. |
|
site.identifier |
string |
The site identifier, which takes different forms depending on the value of the type property. |
|
site.type |
string |
The site type.
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/"
|
|
Methods
Use the insert method to verify the authenticated user's ownership of a website or domain. Use the get, update, and delete methods to retrieve or modify a resource that has already been verified for the authenticated user.
You can see all verified resources for the authenticated user with list, and you can get a token to place on the authenticated user's site with getToken.
- delete
- Unverifies the user's ownership of a website or domain.
- get
- Retrieves the most current data for a website or domain.
- getToken
- Gets a verification token for the authenticated user to place on a website or domain.
- insert
- Verifies ownership of a website or domain.
- list
- Gets the list of the authenticated user's verified websites and domains.
- update
- Modifies the list of owners for a website or domain.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-06-11 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-06-11 UTC."],[[["A WebResource represents a verified website or domain and includes its ID, URL/domain, and a list of owners, which always includes the authenticated user."],["You can verify ownership, retrieve, update, and delete WebResources using the provided methods."],["WebResource data includes an ID, owner list, and site information containing the identifier and type (e.g., website, Android app, domain)."],["`site.identifier` can be a domain name, a URL, or an Android app URL depending on the `site.type`."],["Several 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."]]],["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"]]