Xác minh quyền sở hữu một trang web hoặc miền.
Thử ngay.
Trước khi gọi insert, hãy đặt mã xác minh của người dùng đã xác thực trên trang web hoặc miền của họ. Khi bạn gọi lệnh insert, dịch vụ Xác minh trang web của Google sẽ truy vấn trang web hoặc miền đó và tìm mã thông báo.
Nếu tìm thấy mã thông báo của người dùng trên trang web hoặc miền, Google sẽ ghi nhận trang web là đã xác minh.Người dùng đã xác thực cũng có thể uỷ quyền sở hữu; mọi địa chỉ email bạn chỉ định trong trường owners trong nội dung yêu cầu cũng được ghi lại là chủ sở hữu trang web đã xác minh.
Tham số truy vấn verificationMethod sẽ chỉ định loại mã xác minh mà Google cần kiểm tra.Giá trị của verificationMethod phải khớp với giá trị được truyền trước đó đến getToken.
Yêu cầu
Yêu cầu HTTP
POST https://www.googleapis.com/siteVerification/v1/webResource?verificationMethod=method
Tham số
Tên thông số
Giá trị
Mô tả
Tham số truy vấn bắt buộc
verificationMethod
string
Phương pháp sử dụng để xác minh trang web hoặc miền.
[null,null,["Cập nhật lần gần đây nhất: 2024-08-23 UTC."],[[["The Site Verification API allows you to programmatically verify ownership of a website or domain using a verification token."],["Before verification, you need to place a verification token on your website, obtained via the `getToken` method."],["The API confirms ownership by checking for the token and records verified owners, including delegated ones."],["This process requires authorization with specific scopes related to site verification."],["A successful verification returns a WebResource resource, confirming the site or domain ownership."]]],["To verify website ownership, place the user's verification token, obtained via `getToken`, on the site. Send a POST request to `/site-verification/v1/webResource/insert` with the `verificationMethod` query parameter matching the token type. Google's service checks for the token and records the site as verified if found. You can also specify additional owners in the request body. Ownership is stored and visible to all current and future owners. This request requires authorization with specified scopes.\n"]]