The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Technical SEO Issues
    4. How do I authenticate a script with Search Console API to pull data

    How do I authenticate a script with Search Console API to pull data

    Technical SEO Issues
    2 2 57
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Cnvrt
      Cnvrt last edited by

      In regards to this article, https://moz.com/blog/how-to-get-search-console-data-api-python

      I've gotten all the way to the part where I need to authenticate the script to run. I give access to GSC and the local host code comes up. In the article, it says to grab the portion between = and #, but that doesnt seem to be the case anymore. This is what comes up in the browser

      http://localhost/?code=4/igAqIfNQFWkpKyK6c0im0Eop9soZiztnftEcorzcr3vOnad6iyhdo3DnDT1-3YFtvoG3BgHko4n1adndpLqjXEE&scope=https://www.googleapis.com/auth/webmasters.readonly

      When I put portions of it in, it always comes back with an error.

      Help!

      1 Reply Last reply Reply Quote 0
      • willcritchlow
        willcritchlow last edited by

        Hi Jo. So I think that you want everything after code= and before the &.

        In the example you pasted, that would be:

        4/igAqIfNQFWkpKyK6c0im0Eop9soZiztnftEcorzcr3vOnad6iyhdo3DnDT1-3YFtvoG3BgHko4n1adndpLqjXEE

        If that doesn't work (or rather, it doesn't work when you re-run it and use whatever value comes up next time), let us know and I'll pull in someone who has done this themselves (I'm just reading the same instructions!).

        Good luck

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post
        • Google search console showing canonical issues
          hamidamou1382
          hamidamou1382
          0
          7
          143

        • Should I noindex pages on my website that are pulled from an API integration
          Martijn_Scheijbeler
          Martijn_Scheijbeler
          0
          2
          26

        • Google Search Console Not Sending Messages
          Vijay-Gaur
          Vijay-Gaur
          0
          3
          239

        • Search Console Errors 400 and 405
          Mobilio
          Mobilio
          0
          4
          104

        • Enabling Podcast for Search / Structured Data
          HiddenPeak
          HiddenPeak
          0
          2
          55

        • Google Search Console - Sitemap
          DickensLawGroup
          DickensLawGroup
          0
          8
          110

        • Discrepancy between Google Search Console and flang.dejanseo
          Kilgray
          Kilgray
          0
          5
          101

        • Soft 404 in Search Console
          abisti2
          abisti2
          0
          3
          271

        Get started with Moz Pro!

        Unlock the power of advanced SEO tools and data-driven insights.

        Start my free trial
        Products
        • Moz Pro
        • Moz Local
        • Moz API
        • Moz Data
        • STAT
        • Product Updates
        Moz Solutions
        • SMB Solutions
        • Agency Solutions
        • Enterprise Solutions
        • Digital Marketers
        Free SEO Tools
        • Domain Authority Checker
        • Link Explorer
        • Keyword Explorer
        • Competitive Research
        • Brand Authority Checker
        • Local Citation Checker
        • MozBar Extension
        • MozCast
        Resources
        • Blog
        • SEO Learning Center
        • Help Hub
        • Beginner's Guide to SEO
        • How-to Guides
        • Moz Academy
        • API Docs
        About Moz
        • About
        • Team
        • Careers
        • Contact
        Why Moz
        • Case Studies
        • Testimonials
        Get Involved
        • Become an Affiliate
        • MozCon
        • Webinars
        • Practical Marketer Series
        • MozPod
        Connect with us

        Contact the Help team

        Join our newsletter
        Moz logo
        © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
        • Accessibility
        • Terms of Use
        • Privacy