0

We just call this url almost 12 hour back using php google indexing api to index our url in Google Search ( Not in Google for Jobs ) and i got 200 response code

https://www.yuvajobs.com/government-jobs/manit-maulana-azad-national-institute-of-technology-recruitment-6993.html

But almost 12 hour this page still not in google,

most important that my google api consol show 1 request. check following

Name
Requests
Errors (%)
Latency, median (ms)
Latency, 95% (ms)
Indexing API    1   0   393 511 

we are using following php code to call to indexing api, and it was suggested by a google code site, can anyone check what is issue

$url='https://www.yuvajobs.com/government-jobs/manit-maulana-azad-national-institute-of-technology-recruitment-6993.html';

$client = new Google_Client();

// service_account_file.json is the private key that you created for your service account.
$client->setAuthConfig('service_account_file.json');
$client->addScope('https://www.googleapis.com/auth/indexing');


// Get a Guzzle HTTP Client
$httpClient = $client->authorize();
$endpoint = 'https://indexing.googleapis.com/v3/urlNotifications:publish';

$content = "{
  \"url\": \"".$url."\",
  \"type\": \"URL_UPDATED\" 
}";

$response = $httpClient->post($endpoint, [ 'body' => $content ]);

$status_code = $response->getStatusCode();
print_r($status_code).' : ';

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.