0

I am trying to build an app where users can connect their Google My Business profiles and then select any of them any time to post content and product updates to their GMB businesses via my app.

I have filled this Form several times with no success. Google support team keep turning me around. No progress made so far.

I am using NodeJS for my backend server.

Here is what I have tried code-wise to fetch the connected Business accounts of an authenticated user

const { google } = require('googleapis');
const mybusinessaccountmanagement = google.mybusinessaccountmanagement('v1');

async fetchGoogleMyBusinessAccounts(req,res) {
        let accessToken = //Redacted
        const authCredentials = //Redacted
        const oauth2Client = //Redacted
        google.options({ auth: oauth2Client });
        try {
            let data = await mybusinessaccountmanagement.accounts.list();
            console.log(`GMB Accounts response = ${JSON.stringify(data, null, 2)}`);
        } catch (e) {
            console.log('Error retrieving GMB Accounts: Full error below:');
            console.log(e); //I keep getting Quota exceeded
        }
    }

Calling the function above always comes back with

Quota exceeded error

Please, what do I do differently to make head-way?

Thank you

ololo
  • 1,326
  • 2
  • 14
  • 47
  • Did you enable the API yet? Is the current quota 0? Have you created credentials yet? – vpgcloud Jun 08 '22 at 08:38
  • Yes, I have enabled the API already before starting. The current quota is 0 and yes I have created credentials as well...Everything you asked is checked – ololo Jun 08 '22 at 09:01

1 Answers1

1

This form mentioned under Request access to the APIs should help.

The one you were trying is for the old Google My Business API.

vpgcloud
  • 1,294
  • 2
  • 10
  • 19