Open
Description
Basically, Someone already added my email to Google Search Console and right now i can see the site listed under the search console from the browser.
Now, Am trying to connect to Google Search Console API.
I already enable Google Search Console API and created a service account.
Currently, am trying to list the sites within the API but it's giving an empty dictionary! not sure what am missing here?
from googleapiclient._auth import credentials_from_file
from googleapiclient.discovery import build
service = build('searchconsole', 'v1', credentials=credentials_from_file(
'credentials.json'))
print(service.sites().list().execute())
output:
{}