How do I authenticate a script with Search Console API to pull data
-
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
When I put portions of it in, it always comes back with an error.
Help!
-
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
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Spammy Structured Data Markup Removal
Hi There, I'm in a weird situation and I am wondering if you can help me. Here we go, We had some of our developers implement structured data markup on our site, and they obviously did not know what they were doing. They messed up our results in the SERP big time and we wound up getting manually penalized for it. We removed those markups and got rid of that penalty (phew), however now we are still stuck with two issues. We had some pages that we changed their URLs, so the old URLs are now dead pages getting redirected to the newer version of the same old page, however, two things now happened: a) for some reason two of the old dead pages still come up in the Google SERP, even though it's over six weeks since we changed the URLs. We made sure that we aren't linking to the old version of the url anywhere from our site. b) those two old URLs are showing up in the SERP with the old spammy markup. We don't have anywhere to remove the markup from cause there are no such pages anymore so obviously there isn't this markup code anywhere anymore. We need a solution for getting the markup out of the SERP. We thought of one idea that might help - create new pages for those old URLs, and make sure that there is nothing spammy in there, and we should tell google not to index these pages - hopefully, that will get Google to de-index those pages. Is this a good idea, if yes, is there anything I should know about, or watch out for? Or do you have a better one for me? Thanks so much
Technical SEO | | Joseph-Green-SEO0 -
I added a WP Customer Reviews plugin but nothing seems to appear on Google search
Hi, I've added the wordpress Wp Customer Reviews plugin to a my client's website and we brought some past clients to put on reviews in order to empower the hReview factor. Google as scraped the website several times since but we don't see any change in the organic serp. Can you please tell me if I've done something wrong or I forgot something? That's the website - Capital Garage Door Thanks!
Technical SEO | | captainjoe0 -
Why is there a difference in the number of indexed pages shown by GWT and site: search?
Hi Moz Fans, I have noticed that there is a huge difference between the number of indexed pages of my site shown via site: search and the one that shows Webmaster Tools. While searching for my site directly in the browser (site:), there are about 435,000 results coming up. According to GWT there are over 2.000.000 My question is: Why is there such a huge difference and which source is correct? We have launched the site about 3 months ago, there are over 5 million urls within the site and we get lots of organic traffic from the very beginning. Hope you can help! Thanks! Aleksandra
Technical SEO | | aleker0 -
Source Data -- Order of Page Attributes
Hi everyone, I recently began working on a site with some peculiar things going on in the source code. Namely, the <title>attribute is beneath the <meta description> and <meta keywords> attributes. </p> <p>I checked a number of the client's competitors and found that none of them have the page attributes in the source data ordered like this. Instead, they have the attributes organized more traditionally (as I've usually seen them) in the following order <title>, <meta description>, <meta keywords>.</p> <p>I'm just wondering whether or not this may have any effect on their ability to rank for the desired keyword terms. </p> <p> </p></title>
Technical SEO | | maxcarnage0 -
Retaining Image Search Rankings After Migration
Hi There, I have a client with a very interesting dilemma out there. If you do an image search his images appear quite high in the rankings. However the way he achieved this isn't exactly within Google's guidelines. He is basically hiding the images within CSS. The reason behind this is that the pages have changed over the years and the images didn't fit in with the new existing text but he still wanted to maintain the high image search rankings. He is now changing to a brand new site and so this page he has been able to tweak successfully before, will no longer exist. He want's to know what is the best way to maintain his image search rankings. will a 301 redirect be enough? I know the morality issues of hiding images, but I want to know if he did what would be the best way to preserve his current image rankings. Kind Regards Neil
Technical SEO | | nezona0 -
Loss of search engine positions after 301 redirect - what went wrong?!?
Hi Guys After adhering to the On Page optimisation suggestions given by SEOmoz, we redirected some of old urls to new ones. We set 301 redirects from the old pages to new on a page by page basis but our search engine ranking subsequently fell off the radar and lost PR. We confirmed redirection with fiddler and it shows 301 permanent redirect on every page as expected. To manage redirection using a common code logic we executed following: In Http module, using “rewrite path” we route “all old page requests” to a page called “redirect.aspx? oldpagename =[oldpagename]”. This happens at server side. In redirect.aspx we are redirecting from old page to new page using 301 permanent redirect. In the browser, when old page is requested, it will 301 redirect to new page. In hope we and others can learn from our mistakes - what did we do wrong ?!? Thanks in advance. Dave - www.paysubsonline.com
Technical SEO | | Evo0 -
Google search result going to a page that I did not put on my site
Hi, I am seeing a very strange result in google for my site. When doing a search for the term "london reflexology" my site comes up 18th in the results. But when I click the link or check the URL it shows up as: http://www.reflexologyonline.co.uk/reflexologyonline.php?Action=Webring This is not right at all. It looks like some sort of cloaking but I am not sure. I am new to SEO and I do not know why goole is showing this URL that does not exist on my site and of witch the content is totally wrong. Can anyone please help with this? See the 2 linked images for more details. It seems to me the site might be hacked or something to that effect. Please help.... jyJdP.png 71Mf4.png
Technical SEO | | RupDog0 -
Meta data in includes: not ideal or a problem?
I have pages with meta data being pulled in via an include. This was to prevent people from touching the pages themselves. Is this an optimization issue- or is it OK to do?
Technical SEO | | Tribeca-Marketing-Group0