Can't retrieve data on a url with "sc-domain" using google search api

116 Views Asked by At

While using

$sites = $searchConsole->sites->listSites();

I confirmed that I have siteFullUser access

But when I try to get information on a URL with this code

$serviceSearchConsole = new Google_Service_SearchConsole($client);
$queryURL = new Google_Service_SearchConsole_InspectUrlIndexRequest();
$queryURL->setSiteUrl($projecturl);
$queryURL->setInspectionUrl($url);
$result = $serviceSearchConsole->urlInspection_index->inspect($queryURL);

I get this error: You do not own this site, or the inspected URL is not part of this property

Worth mentioning that I do have access, and I get information about keywords and impressions, etc... just can't get information on URLs. I assume it's a problem since the site is confirmed by DNS and not by http\https URL. but I try many forms of URL and sc-domain and nothing works.

0

There are 0 best solutions below