practical-data-science / ecommercetools

EcommerceTools is a Python data science toolkit for ecommerce, marketing science, and technical SEO analysis and modelling and was created by Matt Clarke.
MIT License
242 stars 48 forks source link

seo.query_google_search_console cant read JSON Client Secret file #22

Closed hapesurya closed 2 years ago

hapesurya commented 2 years ago

I already generate JSON Client Secret from Google API then I run Google Search Console command

df = seo.query_google_search_console(key, site_url, payload)

Then Terminal respond

Error: Service account info was not in the expected format, missing fields token_uri, client_email.

flyandlure commented 2 years ago

Sounds like your client secret file isn't in the expected format. Please can you follow the steps in this guide: https://practicaldatascience.co.uk/data-engineering/how-to-create-a-google-service-account-client-secrets-json-key

Should work then.