Why I can't have successful site verification even the page contains required <meta>
value
<meta name="google-site-verification" content="example-here-wOdSNt90kex2PFg1TEtv_8" />
Running in Rails app with the following used gems:
gem "google-api-client", "~> 0.53.0"
gem "omniauth-google-oauth2", "~> 1.1.1"
Sample API request and response below:
Sending HTTP post https://www.googleapis.com/siteVerification/v1/webResource?verificationMethod=META
400
#<HTTP::Message:0x00005632d9de41f0 @http_header=#<HTTP::Message::Headers:0x00005632d9de41c8
@http_version="1.1", @body_size=0, @chunked=false, @request_method="POST", @request_uri=#<Addressable::URI:0x2b196cef28dc URI:https://www.googleapis.com/siteVerification/v1/webResource?verificationMethod=META>, @request_query=nil, @request_absolute_uri=nil,
@status_code=400, @reason_phrase="Bad Request", @body_type=nil, @body_charset=nil,
@body_date=nil, @body_encoding=#<Encoding:UTF-8>, @is_request=false,
@header_item=[["Content-Type", "application/json; charset=UTF-8"], ["Vary", "Origin"], ["Vary", "X-Origin"],
["Vary", "Referer"], ["Content-Encoding", "gzip"], ["Date", "Wed, 01 Nov 2023 02:20:53 GMT"], ["Server", "ESF"], ["Cache-Control", "private"],
["X-XSS-Protection", "0"], ["X-Frame-Options", "SAMEORIGIN"], ["X-Content-Type-Options", "nosniff"], ["Alt-Svc", "h3= ":443 "; ma=2592000,h3-29= ":443 "; ma=2592000"], ["Transfer-Encoding", "chunked"]], @dumped=false>,
@peer_cert=#<OpenSSL::X509::Certificate: subject=#<OpenSSL::X509::Name CN=upload.video.google.com>,
issuer=#<OpenSSL::X509::Name CN=GTS CA 1C3,O=Google Trust Services LLC,C=US>, serial=#<OpenSSL::BN:0x00005632d9df09a0>, not_before=2023-10-09 08:10:33 UTC, not_after=2024-01-01 08:10:32 UTC>,
@http_body=#<HTTP::Message::Body:0x00005632d9de4128 @body="{ "error ": { "code ": 400, "message ": "The necessary verification token could not be found on your site. ", "errors ": [ { "message ": "The necessary verification token could not be found on your site. ", "domain ": "global ", "reason ": "badRequest " } ] }}", @size=0, @positions=nil, @chunk_size=nil>, @previous=nil>