简体   繁体   中英

How can I get moving with Google My Business API from NodeJS

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

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM