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

404 - Method not found

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

Hi,

I'm getting error when trying to do basic call: https://mybusiness.googleapis.com/v3/accounts in OAuth 2.0 Playground. Error response is:

 

 

{
  "error": {
    "status": "NOT_FOUND", 
    "message": "Method not found.", 
    "code": 404
  }
}

 

I've created new project and enabled Business API. Also submitted access request form for this project. Right now I don't know what is the cause and how to debug. Is it possible to check what is the "status" of sent access request form?

 

Worth to mention - this is second project for Business API I've created with my google account. And also Business API was already available to enable after creating project, even without sending access request form (but I sent it anyway). I'm doing everything like written on "Prerequisites" and "Get started" pages (AFAIK).

 

Help please?

1 Expert replyverified_user

Re: 404 - Method not found

Google Employee
# 2
Google Employee

Hi @McDonalds I,

 

I've verified that your original project is still approved and whitelisted to use the Google My Business API. If you submitted a separate project that will be used for testing purposes, since we are currently only whitelisting one project per business as stated in our FAQ, please perform any testing with unverified locations in your primary project and do not submit another access request form entry.

 

You can create a separate Google Account or Business Account for testing purposes to create new locations in Google My Business and not verify them. These unverified locations will only be visible to the user and are not eligible to show up on Google Maps and other Google properties. Therefore, these unverified locations will not impact your production data.

 

In addition, when you are sending a POST request to create a new location or a PATCH request to update a specified location, if you set the validateOnly boolean query parameter to true, the request is validated without actually affecting the location. Similarly, when you are sending a PUT request to update a specified business account, and set the validateOnly boolean query parameter to true, the request is validated without actually updating the account. You can use this schema for testing changes to location and business account data via the API without impacting production data.

 

Thanks,

Terry

Re: 404 - Method not found

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Hi Terry,

thanks for answer!
OK, I understand that you allow only one verified and whitelisted project per Google/Business Account. The purpose with creating another one was slightly different though. It was created to prevent messing with credentials and tokens generated for existing project, that we are already running live - to keep it safe while working on new features on development environments.
Is there any other way to achieve such separation?
Marked as Best Answer.
Solution
Accepted by topic author McDonalds I
June 2016

Re: 404 - Method not found

Google Employee
# 4
Google Employee

Hi @McDonalds I,

 

You don’t need a separate set of OAuth 2.0 credentials for access to your account and location data in each different Google Account. For separation of access to your Google My Business data in different Google Accounts, all you need to do is to generate and store a separate OAuth 2.0 access token for each Google Account that you use for managing locations in Google My Business.

 

For generating separate OAuth 2.0 access tokens for each Google Account, when you use your whitelisted project’s credentials to obtain an OAuth 2.0 access token for authentication via the Google My Business API, you should be logging in with your specific Google Account. When this token is provided and you are making API calls, you will be able to view and manage all the existing locations within that specific account. You should repeat this process with a single set of OAuth 2.0 credentials for your separate Google Accounts to obtain a token for each Google Account.

 

In addition, when using the OAuth 2.0 client ID for authorization, you should store the refresh token for future use and use the access token to access the API. Once the access token expires, the application should use the refresh token to obtain a new one. This way, your application will always be able to request a new access token when necessary. This process requires a user to manually authorize the application only once.

 

Thanks,

Terry

Re: 404 - Method not found

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭
Hi Terry,

thanks for answers, I understand now.