My Business
5.5K members online now
5.5K members online now
For developers who are using the Google My Business API to manage locations
Guide Me
star_border
Reply

What is the correct discovery url for v3?

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

For v2 I used "https://developers.google.com/my-business/samples/{api}_google_rest_{apiVersion}.json"

which the python service translated to "https://developers.google.com/my-business/samples/mybusiness_google_rest_v2.json"

My interpretation of the documentation is the discovery url for v3 is "https://mybusiness.googleapis.com/$discovery/rest?version=v3", but when I make that call I receive a 404 and "googleapiclient.errors.UnknownApiNameOrVersion: name: mybusiness  version: v3". 

Is this the correct url?

 

I am using python and the google-api-python-client.  

 

This is my debug information:

*** start request args

https://mybusiness.googleapis.com/$discovery/rest?version=v3

GET

None

{'Authorization': 'Bearer XXXX'}

5

None

*** response ****

({'status': '404', 'alternate-protocol': '443:quic', 'content-length': '154', 'x-xss-protection': '1; mode=block', 'x-content-type-options': 'nosniff', 'transfer-encoding': 'chunked', 'vary': 'Origin, X-Origin, Referer', 'server': 'ESF', '-content-encoding': 'gzip', 'cache-control': 'private', 'date': 'Fri, 13 May 2016 16:47:00 GMT', 'x-frame-options': 'SAMEORIGIN', 'alt-svc': 'quic=":443"; ma=2592000; v="34,33,32,31,30,29,28,27,26,25"', 'content-type': 'application/json; charset=UTF-8'}, '{\n  "error": {\n    "code": 404,\n    "message": "Discovery document not found for API service: mybusiness.googleapis.com",\n    "status": "NOT_FOUND"\n  }\n}\n')

2 Expert replyverified_user
Marked as Best Answer.
Solution
Accepted by topic author Greg E
May 2016

Re: What is the correct discovery url for v3?

Google Employee
# 2
Google Employee

Hi @Greg E,

 

You can find the Google My Business API v3 discovery document on the Downloads and Samples page of our documentation website, and the URL of the discovery document is the following:

https://developers.google.com/my-business/samples/mybusiness_google_rest_v3.json

 

Please fetch the discovery document using the URL we provide on our documentation website and not via the the Google API Discovery Service.

 

Thanks, 

Terry

Re: What is the correct discovery url for v3?

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Thanks, I will try that. This is what confused me. In the documentation,
https://developers.google.com/my-business/reference/rest/
it says "The Discovery URL of this API is https://mybusiness.googleapis.com/$discovery/rest?version=[v1|v2|v3]

Re: What is the correct discovery url for v3?

Google Employee
# 4
Google Employee

Thanks for pointing this out @Position T, we'll take a closer look at clarifying this in the documentation.