WebResource: getToken
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
अनुमति देना ज़रूरी है
वेबसाइट या डोमेन पर, पुष्टि किए गए उपयोगकर्ता को डालने के लिए, उससे एक पुष्टि टोकन मिलता है.
इसे अभी आज़माएं.
अनुरोध
एचटीटीपी अनुरोध
POST https://www.googleapis.com/siteVerification/v1/token
अनुमति देना
इस अनुरोध के लिए, इनमें से कम से कम एक दायरे का इस्तेमाल करके अनुमति लेना ज़रूरी है (पुष्टि करने और अनुमति देने के बारे में ज़्यादा पढ़ें).
दायरा |
https://www.googleapis.com/auth/siteverification |
https://www.googleapis.com/auth/siteverification.verify_only |
अनुरोध का मुख्य भाग
अनुरोध के मुख्य हिस्से में, इस स्ट्रक्चर के साथ डेटा उपलब्ध कराएं:
{
"site": {
"type": string,
"identifier": string
},
"verificationMethod": string
}
प्रॉपर्टी का नाम |
मान |
ब्यौरा |
नोट |
site |
object |
साइट के पते और टाइप के लिए कंटेनर जिसके लिए पुष्टि टोकन जनरेट किया जाएगा. |
|
site.type |
string |
पुष्टि किए जाने वाले संसाधन का टाइप.
ये वैल्यू स्वीकार की जाती हैं:
- "
ANDROID_APP "
- "
INET_DOMAIN "
- "
SITE "
|
|
site.identifier |
string |
साइट आइडेंटिफ़ायर. अगर टाइप SITE पर सेट है, तो आइडेंटिफ़ायर एक यूआरएल होता है. अगर टाइप INET_DOMAIN पर सेट है, तो आइडेंटिफ़ायर एक डोमेन नेम होता है. |
|
verificationMethod |
string |
साइट या डोमेन की पुष्टि करने के लिए, साइट की पुष्टि करने वाले सिस्टम के लिए, पुष्टि करने का तरीका.
ये वैल्यू स्वीकार की जाती हैं:
- "
ANALYTICS ": सिर्फ़ साइटें
- "
DNS ": इसके बजाय, DNS_TXT का इस्तेमाल करें
- "
DNS_CNAME ": सिर्फ़ डोमेन
- "
DNS_TXT ": सिर्फ़ डोमेन
- "
FILE ": सिर्फ़ साइटें
- "
META ": सिर्फ़ साइटें
- "
TAG_MANAGER ": सिर्फ़ साइटें
|
|
जवाब
सही तरीके से काम करने पर, यह तरीका इस स्ट्रक्चर के साथ रिस्पॉन्स का मुख्य हिस्सा दिखाता है:
{
"method": string,
"token": string
}
प्रॉपर्टी का नाम |
मान |
ब्यौरा |
नोट |
method |
string |
पुष्टि करने का वह तरीका जिसे आपने अनुरोध में चुना है.
ये वैल्यू स्वीकार की जाती हैं:
- "
ANALYTICS "
- "
DNS "
- "
DNS_CNAME "
- "
DNS_TXT "
- "
FILE "
- "
META "
- "
TAG_MANAGER "
|
|
token |
string |
पुष्टि करने के लिए चुने गए तरीके का इस्तेमाल करके, पुष्टि किए गए उपयोगकर्ता की साइट पर डाली जाने वाली स्ट्रिंग. ज़्यादा जानकारी के लिए, 'शुरू करना' दस्तावेज़ में पुष्टि करने के तरीके और टोकन देखें. |
|
इसे आज़माएं!
लाइव डेटा पर इस तरीके को कॉल करने और जवाब देखने के लिए, नीचे दिए गए एपीआई एक्सप्लोरर का इस्तेमाल करें.
वैकल्पिक रूप से, यह आज़माएं
स्टैंडअलोन
एक्सप्लोरर.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया."],[[["\u003cp\u003eRetrieves a verification token for website or domain ownership verification upon authorization.\u003c/p\u003e\n"],["\u003cp\u003eSupports various verification methods including \u003ccode\u003eANALYTICS\u003c/code\u003e, \u003ccode\u003eDNS\u003c/code\u003e, \u003ccode\u003eDNS_CNAME\u003c/code\u003e, \u003ccode\u003eDNS_TXT\u003c/code\u003e, \u003ccode\u003eFILE\u003c/code\u003e, \u003ccode\u003eMETA\u003c/code\u003e, and \u003ccode\u003eTAG_MANAGER\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eRequires specifying the site type (\u003ccode\u003eSITE\u003c/code\u003e, \u003ccode\u003eINET_DOMAIN\u003c/code\u003e, or \u003ccode\u003eANDROID_APP\u003c/code\u003e) and identifier (URL or domain name).\u003c/p\u003e\n"],["\u003cp\u003eReturns the selected verification method and the corresponding token to be placed on the site.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization is required with the \u003ccode\u003esiteverification\u003c/code\u003e or \u003ccode\u003esiteverification.verify_only\u003c/code\u003e scope.\u003c/p\u003e\n"]]],["To get a verification token, send a POST request to the specified URL, including authorization with the correct scope. The request body must contain a `site` object with the `type` (e.g., `SITE`, `INET_DOMAIN`) and `identifier` (e.g., URL, domain name) of the site, as well as the desired `verificationMethod`. The successful response will return the chosen `method` and the `token` string to be placed on the site for verification.\n"],null,["# WebResource: getToken\n\n**Requires [authorization](#auth)**\n\nGets a verification token for the authenticated user to place on a website or domain.\n[Try it now](#try-it).\n\nRequest\n-------\n\n### HTTP request\n\n```\nPOST https://www.googleapis.com/siteVerification/v1/token\n```\n\n### Authorization\n\nThis request requires authorization with at least one of the following scopes ([read more about authentication and authorization](/site-verification/v1/getting_started#auth)).\n\n| Scope |\n|----------------------------------------------------------------|\n| `https://www.googleapis.com/auth/siteverification` |\n| `https://www.googleapis.com/auth/siteverification.verify_only` |\n\n### Request body\n\nIn the request body, supply data with the following structure:\n\n```carbon\n{\n \"site\": {\n \"type\": string,\n \"identifier\": string\n },\n \"verificationMethod\": string\n}\n```\n\n| Property name | Value | Description | Notes |\n|----------------------|----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------|\n| `site` | `object` | Container for the address and type of a site for which a verification token will be generated. | |\n| site.`type` | `string` | The type of resource to be verified. \u003cbr /\u003e Acceptable values are: - \"`ANDROID_APP`\" - \"`INET_DOMAIN`\" - \"`SITE`\" | |\n| site.`identifier` | `string` | The site identifier. If the type is set to `SITE`, the identifier is a URL. If the type is set to `INET_DOMAIN`, the identifier is a domain name. | |\n| `verificationMethod` | `string` | The verification method for the Site Verification system to use to verify this site or domain. \u003cbr /\u003e Acceptable values are: - \"`ANALYTICS`\": Sites only - \"`DNS`\": Use DNS_TXT instead - \"`DNS_CNAME`\": Domains only - \"`DNS_TXT`\": Domains only - \"`FILE`\": Sites only - \"`META`\": Sites only - \"`TAG_MANAGER`\": Sites only | |\n\nResponse\n--------\n\nIf successful, this method returns a response body with the following structure:\n\n```text\n{\n \"method\": string,\n \"token\": string\n}\n```\n\n| Property name | Value | Description | Notes |\n|---------------|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------|\n| `method` | `string` | The verification method that you selected in the request. \u003cbr /\u003e Acceptable values are: - \"`ANALYTICS`\" - \"`DNS`\" - \"`DNS_CNAME`\" - \"`DNS_TXT`\" - \"`FILE`\" - \"`META`\" - \"`TAG_MANAGER`\" | |\n| `token` | `string` | The string to place on the authenticated user's site, using the selected verification method. For more information, see [Verification methods and tokens](/site-verification/v1/getting_started#tokens) in the Getting Started document. | |\n\nTry it!\n-------\n\n\nUse the APIs Explorer below to call this method on live data and see the response.\nAlternatively, try the\n[standalone\nExplorer](https://developers.google.com/apis-explorer/#p/siteVerification/v1/siteVerification.webResource.getToken)."]]