56 lines
1.9 KiB
Markdown
56 lines
1.9 KiB
Markdown
# Google Business Profile Audit App
|
|
|
|
Small local Node.js app for connecting a Google account and listing the Google Business Profile accounts and businesses available to that user.
|
|
|
|
## Setup
|
|
|
|
1. Install dependencies:
|
|
|
|
```powershell
|
|
npm install
|
|
```
|
|
|
|
2. In Google Cloud Console, make sure these APIs are enabled for the OAuth project:
|
|
|
|
- My Business Account Management API
|
|
- Business Information API
|
|
- Places API, if you want competitor lookup
|
|
|
|
3. Make sure your OAuth client allows this redirect URI:
|
|
|
|
```text
|
|
http://localhost:3000/oauth2callback
|
|
```
|
|
|
|
Your current `gmb_audit.json` is an installed-app OAuth client. If Google rejects the redirect URI, add the URI above to the OAuth client or create a Web application OAuth client and download its JSON.
|
|
|
|
4. Start the app:
|
|
|
|
```powershell
|
|
npm start
|
|
```
|
|
|
|
5. Open:
|
|
|
|
```text
|
|
http://localhost:3000
|
|
```
|
|
|
|
6. Click an account, then click any business card to run the first audit checklist for that location.
|
|
|
|
7. For competitor lookup, add a Google Maps Platform API key to `.env`:
|
|
|
|
```text
|
|
GOOGLE_MAPS_API_KEY=your_google_maps_platform_api_key_here
|
|
```
|
|
|
|
Then restart the app and use the Competitor Lookup search box.
|
|
|
|
## Notes
|
|
|
|
- Tokens are saved locally in `.tokens/user.json`.
|
|
- Keep `gmb_audit.json` and `.tokens/` private. They contain credentials.
|
|
- If account or location calls return quota errors, request/confirm Google Business Profile API access for the project.
|
|
- The audit checks core Business Profile fields and tries to load reviews, services, media, posts, attributes, and food menus. Some sections are only available for verified or eligible locations, so unavailable sections are shown separately.
|
|
- Competitor lookup uses the Places API public `primaryType` and `types` fields. These are not the full private GBP primary/secondary category assignments shown inside the GBP owner dashboard.
|