Google Business Performance API has a
NEW API method that allows fetching multiple `DailyMetrics` in a single API request. Review the
deprecation schedule and instructions to migrate over from v4 reportInsights API method to Google Business Profile Performance API.
Work with account data
Stay organized with collections
Save and categorize content based on your preferences.
This tutorial shows you how to work with account data. The My Business Account Management API
provides you with the ability to do the following:
- List all accounts.
- Return a specific account.
- Update an account.
Before you begin
Before you use the My Business Account Management API, you need to register your application
and obtain OAuth 2.0 credentials.
For details on how to get started with the Business Profile APIs, see
Basic setup.
List all accounts
A great way to validate the accounts associated with an authenticated user is to
list all their accounts. Use the accounts.list
API to list all accounts associated with a user.
To list all the accounts for an authenticated user, use the following:
$ GET https://mybusinessaccountmanagement.googleapis.com/v1/accounts
Return a specific account
Sometimes, you only want to see information about a specific account for an
authenticated user. Use the accounts.get
API to return a specific account and review additional account details.
To return a specific account by name, use the following:
$ GET https://mybusinessaccountmanagement.googleapis.com/v1/accounts/{accountId}
Update an account
Changing an account name is a fundamental administrative task. Use the
accounts.update
API to alter
the account name.
To update a specific account by name, use the following:
$ PUT https://mybusinessaccountmanagement.googleapis.com/v1/accounts/{accountId}
{
"account": {
"accountName": "Anne Droyd"
},
"languageCode": "en",
"validateOnly": "true"
}
Restrictions
- The only editable field for an account is
accountName
. Any other fields
passed are ignored.
- Only accounts of
BUSINESS
type can be updated in this manner.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-16 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-16 UTC."],[[["The My Business Account Management API allows you to manage business accounts, including listing all accounts, retrieving specific account details, and updating account names."],["Before using the API, you must register your application and obtain OAuth 2.0 credentials as outlined in the basic setup guide."],["You can retrieve a list of all accounts associated with an authenticated user or fetch details for a specific account using dedicated API endpoints."],["Updating an account is restricted to changing the account name for business type accounts only, with other fields being ignored."]]],[]]