Re: Google Ads API - Service account [HTTP error 401]: “Request had invalid authentication credentials. Expected OAuth 2 access token…”

2020-12-19 Thread Eylon Raymond Harari
This is how I am creating the access token in nodejs (this part is working fine) const { google } = require('googleapis'); ... const getAccessToken = async () => { const SCOPES = ['https://www.googleapis.com/auth/adwords']; const authClient = new google.auth.GoogleAuth({ keyFile:

Google Ads API - Service account [HTTP error 401]: “Request had invalid authentication credentials. Expected OAuth 2 access token…”

2020-12-19 Thread Eylon Raymond Harari
Im building an app with google ads api using a *service account* auth flow (server to server). The problem - the auth part is not working... *Sample of the request:* ``` request({ 'method': 'GET', 'url': 'https://googleads.googleapis.com/v6/customers/', 'headers': { 'Authorization':