Sites: add
ต้องมีการให้สิทธิ์
เพิ่มเว็บไซต์ลงในชุดเว็บไซต์ของผู้ใช้ใน Search Console
ลองใช้เลย
ส่งคำขอ
คำขอ HTTP
PUT https://www.googleapis.com/webmasters/v3/sites/siteUrl
พารามิเตอร์
ชื่อพารามิเตอร์ |
ค่า |
คำอธิบาย |
พารามิเตอร์เส้นทาง |
siteUrl |
string |
URL ของพร็อพเพอร์ตี้ที่จะเพิ่ม ตัวอย่าง
http://www.example.com/ (สำหรับพร็อพเพอร์ตี้คำนำหน้า URL) หรือ
sc-domain:example.com (สำหรับพร็อพเพอร์ตี้โดเมน)
|
การให้สิทธิ์
คำขอนี้ต้องได้รับการให้สิทธิ์ตามขอบเขตต่อไปนี้ (อ่านเพิ่มเติมเกี่ยวกับการตรวจสอบสิทธิ์และการให้สิทธิ์)
ขอบเขต |
https://www.googleapis.com/auth/webmasters |
เนื้อหาของคำขอ
โปรดอย่าให้เนื้อหาคำขอตามวิธีการนี้
คำตอบ
หากสำเร็จ เมธอดนี้จะแสดงเนื้อหาการตอบกลับที่ว่างเปล่า
ลองใช้งาน
ใช้ API Explorer ด้านล่างเพื่อเรียกใช้เมธอดนี้กับข้อมูลแบบสดและดูการตอบกลับ
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-08-24 UTC
[null,null,["อัปเดตล่าสุด 2024-08-24 UTC"],[[["Adds a website to the user's Search Console account, allowing it to be managed and monitored."],["Uses a PUT request to the specified endpoint with the website URL as a path parameter."],["Requires authorization with the `https://www.googleapis.com/auth/webmasters` scope."],["The request body should be empty, and a successful response will also be empty."]]],["This content describes adding a site to a user's Search Console. A `PUT` request to `https://www.googleapis.com/webmasters/v3/sites/siteUrl` is required, with the `siteUrl` path parameter specifying the site's URL (e.g., `http://www.example.com/` or `sc-domain:example.com`). Authorization using the `https://www.googleapis.com/auth/webmasters` scope is mandatory. No request body is needed, and a successful request returns an empty response body. The content refers to using the API Explorer to test the request.\n"]]