Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

googleapiclient.errors.UnknownApiNameOrVersion: name: webmasters version: v3 #1042

Closed
iamsaurabhgupt opened this issue Sep 23, 2020 · 26 comments
Assignees

Comments

@iamsaurabhgupt
Copy link

OS macOS: 10.15.4
Python version: python 3.8.1
pip version: pip 19.0.3
google-api-python-client version: 1.12.1

Code example
from googleapiclient.discovery import build
build('webmasters', "v3", developerKey="developer_key")
Stack trace
googleapiclient.errors.UnknownApiNameOrVersion: name: webmasters version: v3

Hi Team,

While trying to get data from Search Console API and get this error UnknownApiNameOrVersion.
I tried the discovery API and it showed the the discoveryRestUrl as
https://www.googleapis.com/discovery/v1/apis/webmasters/v3/rest
image
But, the same url on web is down:
image
Please rectify immediately.
All our reports are breaking.

@ngodinhnhien
Copy link

I have the same issue with the api
raise UnknownApiNameOrVersion(“name: %s version: %s” % (serviceName, version)) googleapiclient.errors.UnknownApiNameOrVersion: name: webmasters version: v3

It worked fine yesterday, but this morning the issue has came

@pualien
Copy link

pualien commented Sep 23, 2020

same issue for me, started three hours ago

@IreneSoligno
Copy link

We are experiencing the same issue as well

@laura-barkauskaite
Copy link

We have the same issue.

@aethemba
Copy link

We are also running into this issue

@sloev
Copy link

sloev commented Sep 23, 2020

we are seeing this too,
using reqbin you can check its an issue from both US, DE and us in DK

https://reqbin.com/c-4rgtzhsk

curl 'https://www.googleapis.com/webmasters/v3/'

gives 404

related issues:

@sloev
Copy link

sloev commented Sep 23, 2020

@busunkim96 have you heard anything?

somebody tweet about it, crossing fingers for fast solution

https://twitter.com/davidiwanow/status/1308675174003245057

and

https://twitter.com/SimoAhava/status/1308628065296281601

@franloza
Copy link

franloza commented Sep 23, 2020

Same issue for me, 1 hour ago. https://www.googleapis.com/discovery/v1/apis/webmasters/v3/rest is returning 404 from EU

@paddie
Copy link

paddie commented Sep 23, 2020

We are seeing the same issue, since 2 in the morning and as recent as 10 minutes ago, from europe-west1

@Jonnyblacklabel
Copy link

I'm also running into this issue. Data pipelines started at 2 in the morning. All were running into this problem.
Tried localy, and it was working for 5 minutes. Now it's broken again.

@olycats
Copy link

olycats commented Sep 23, 2020

Same here. Started some time within 24 hours.

@raimondast
Copy link

this issue is region related. https://webmasters.googleapis.com/$discovery/rest?version=v3 is reachable from US, but not in major EU.

@Jonnyblacklabel
Copy link

@sloev
Copy link

sloev commented Sep 23, 2020

a very unscientific test involving https://proxy-ams.hidemyass-freeproxy.com/ showed the following http responses based on different locations (right now)

NY: 404
seattle: 200
frankfurt: 200
amsterdam: 404
praque: 200

edit hi @paddie 🤗

edit 2

"maybe if we try again and again the 404/200 is actually morse code from a sys-admin locked in a closet somewhere lulz"
... some speculation in a 🧵 somewhere :trollface:

@paddie
Copy link

paddie commented Sep 23, 2020

edit hi @paddie 🤗

hello darling @sloev - what are you doing here?

@sloev
Copy link

sloev commented Sep 23, 2020

grocery shopping some sweet lookin' data but google wont give it to me after i paid for it :trollface:
....and firing off mischievous jokes of course ;-)

@paddie
Copy link

paddie commented Sep 23, 2020

grocery shopping some sweet lookin' data but google wont give it to me after i paid for it :trollface:
....and firing off mischievous jokes of course ;-)

Doing god's work here bud :)

@Jonnyblacklabel
Copy link

It seems that discovery.build('searchconsole', 'v1') is working. Can somebody verify that?
According to the documentation this is only the beta endpoint for the url testing tool
https://developers.google.com/webmaster-tools/search-console-api/reference/rest

@raimondast
Copy link

It seems that discovery.build('searchconsole', 'v1') is working. Can somebody verify that?
According to the documentation this is only the beta endpoint for the url testing tool
https://developers.google.com/webmaster-tools/search-console-api/reference/rest

I just tried that and it seems to work, but not sure if this is the one to use

@Jonnyblacklabel
Copy link

Google said here already https://webmasters.googleblog.com/2020/08/search-console-api-announcements.html that they would change the API. However, they have set the date as 31 Dec.

"If you’re querying the Search Console API using an external API library, or querying the Webmasters API discovery document directly you will need to take action as we’ll drop the support in the Webmasters discovery document. Our current plan is to support it until December 31, 2020 - but we’ll provide more details and guidance in the coming months."

@ngodinhnhien
Copy link

It works properly again in SEA, but I am not sure if it will collapse again or not

@olycats
Copy link

olycats commented Sep 23, 2020

This issue seem to be resolved now.

@masarliev
Copy link

Not for me

@paddie
Copy link

paddie commented Sep 23, 2020

Google said here already https://webmasters.googleblog.com/2020/08/search-console-api-announcements.html that they would change the API. However, they have set the date as 31 Dec.

"If you’re querying the Search Console API using an external API library, or querying the Webmasters API discovery document directly you will need to take action as we’ll drop the support in the Webmasters discovery document. Our current plan is to support it until December 31, 2020 - but we’ll provide more details and guidance in the coming months."

So, I'm not really seeing, from this article which actions are actually required, but updating the build step to use discovery.build('searchconsole', 'v1') instead of the old discovery.build('webmasters', 'v3') resolved the issue for me, and also seems to be actually using the old webmasters/v3 endpoint with the rest document:

https://www.googleapis.com/discovery/v1/apis/searchconsole/v1/rest

    "sites": {
      "methods": {
        "list": {
          "scopes": [
            "https://www.googleapis.com/auth/webmasters",
            "https://www.googleapis.com/auth/webmasters.readonly"
          ],
          "id": "webmasters.sites.list",
          "parameterOrder": [],
          "path": "webmasters/v3/sites",
          "description": " Lists the user's Search Console sites.",
          "httpMethod": "GET",
          "flatPath": "webmasters/v3/sites",
          "response": {
            "$ref": "SitesListResponse"
          },
          "parameters": {}
        },

working off of that assumption now at least.

@iamsaurabhgupt
Copy link
Author

both webmasters/v3 and searchconsole/v1 are working now.
Seems better to shift to searchconsole/v1 for future consistency.
Closing this now.

@prykon
Copy link

prykon commented Nov 12, 2021

It seems that discovery.build('searchconsole', 'v1') is working. Can somebody verify that?
According to the documentation this is only the beta endpoint for the url testing tool
https://developers.google.com/webmaster-tools/search-console-api/reference/rest

I just tried that and it seems to work, but not sure if this is the one to use

This also worked for me! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests