I can't seem to find out why I'm getting this authentication error.
What I have tried:
Whatever method or environment I try, it results in the same error.
Sample of how I create the access token (nodejs) -> this part works fine:
const { google } = require('googleapis');
....
const getAccessToken = async () => {
const SCOPES = ['https://www.googleapis.com/auth/adwords'];
const authClient = new google.auth.GoogleAuth({
keyFile: './pathtokeyfile.json',
scopes: SCOPES,
});
const token = await authClient.getAccessToken();
return token;
};
Steps I have implemented:
I am surely missing something, but am not sure what it is..
Will be super grateful if someone can share a solution!! thanks champs 👍
|
||||||
|
||||||