You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Google My Business API调用返回404 Method not found问题求助

Fixing 404 "Method not found" for Google My Business API /accounts Request

Hey there, let's troubleshoot that 404 error you're hitting with the Google My Business (GMB) API. I've dealt with similar head-scratchers before, so here are the key fixes to try out:

1. Use the Correct API Endpoint

The biggest culprit here is almost certainly an outdated endpoint. The GMB API has split into specialized services over time, and account management endpoints now live under a dedicated domain. Instead of the URL you tried:

https://mybusiness.googleapis.com/v3/accounts

You need to use the Google My Business Account Management API endpoint:

https://mybusinessaccountmanagement.googleapis.com/v1/accounts

This is the valid, up-to-date path for fetching accounts with recent API versions.

2. Verify the API is Enabled in Your Cloud Project

Even with API permissions granted, you have to explicitly enable the right API in your Google Cloud Console for project twocents-reviews (Project Number: 705754565185):

  • Head to the Cloud Console, select your project.
  • Search for Google My Business Account Management API (note: this is different from the older "Google My Business API").
  • Make sure it’s marked as "Enabled". If not, click "Enable" and wait a couple minutes for changes to kick in.

3. Double-Check Your OAuth 2.0 Scopes

In the OAuth 2.0 Playground, confirm you’re requesting the correct scope for accessing account data:

https://www.googleapis.com/auth/business.manage

Using the wrong scope (or forgetting to add this one) can lead to weird errors—even 404s—since the API won’t recognize your request as valid for the endpoint.

By default, the OAuth Playground uses its own test credentials, which don’t have access to your GMB API project. Fix this by configuring the playground to use your project’s credentials:

  • Click the gear icon (top-right) in the OAuth Playground to open settings.
  • Check "Use your own OAuth credentials".
  • Paste in your project’s Client ID and Client Secret (found in Cloud Console under "APIs & Services > Credentials").
  • Save settings, then re-authorize with the updated credentials.

Why You Got That 404

Your error response spells it out clearly:

{
"error": {
"status": "NOT_FOUND",
"message": "Method not found.",
"code": 404
}
}
This confirms the endpoint path/version you used no longer exists. Switching to the new Account Management API endpoint should resolve this right away.

内容的提问来源于stack exchange,提问作者JasonJensenDev

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.15 08:47:39