-1

I keep receiving the error: 'Error: You do not own this site, or the inspected URL is not part of this property.' when trying to inspect a url using the Google Search Console API although I am the verified owner of the domain.

I am able to list sites with my credentials without issue.

My code:

app.get("/inspecturl", (req, res) => {
  searchconsole.urlInspection.index.inspect(
    {
      siteUrl: "sc-domain:my-domain.co.uk",
      inspectionUrl: "www.my-domain.co.uk",
    },
    (err, response) => {
      if (err) return res.status(500).send(`Error: ${err}`);
      res.send(response.data);
    }
  );
});
Darryl Morley
  • 699
  • 1
  • 7
  • 20

1 Answers1

0

I found the issue, when inspecting the root domain, the inspectionUrl provided must end with a '/'

Darryl Morley
  • 699
  • 1
  • 7
  • 20