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

Connect GMB API using python

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

Hello,  I am Cesar Pelegrin from QDQ Media (Spain)

 

My company has already been whitelisted for GMB API, I already have my client_id and client_secret.

 

I want to use the GMB API, but I do not know where to continue.

 

Do I need a token? And if so, where do I find the python documentation to generate the token?


Is there a python library to use the GMB API?

 

Thanks!!!

1 Expert replyverified_user
Marked as Best Answer.
Solution
Accepted by topic author QDQ Media
May

Re: Connect GMB API using python

Google Employee
# 2
Google Employee

Hi @QDQ Media,

 

Yes, if you are using an OAuth 2.0 client ID, you should obtain an OAuth 2.0 access token and a refresh token for each Google Account you need to access account and location data from. You should store the refresh token for refreshing the access token once it expires and use the access token to access the API.

 

You can use the Google API Client Library for Python to handle all requests since all methods in the Google My Business API are included in the discovery document for the API. You can find a Python code snippet in this thread.

 

We currently don’t have working code samples in Python language to use the Google My Business API. Python is not an official supported language of the Google My Business API. Support for Google API Client Library for Python should be directed to its Support page, and support for Google API Discovery Service should be respectively directed to its Forums. Please keep an eye on the API documentation website where we’ll add new samples to the libraries that are already available.

 

Thanks,

Shalini, Google My Business API team