Skip to content

Connecting to Google Search Console API #2049

Open
@AmericanY

Description

@AmericanY

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:

{}

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs more infoThis issue needs more information from the customer to proceed.type: questionRequest for information or clarification. Not an issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions