I followed this guide to create a web app flow for authenticating users with Google.
Despite listing https://www.googleapis.com/auth/adwords
in the scope parameter, I don't get a gapi.client.adwords
or anything like that once the authentication is complete. I am unable to retrieve any information about the user's MCC/AdWords/Ad Manager accounts.
I've tried using gapi.client.request()
but I can't seem to find the arguments that I should pass for access to the AdWords API.
I'm trying to do something like this:
let __req = gapi.client.request({ method: "GET", path: "/adwords/v?/???", params: { fields: "???" } }); __req.execute(function(response) { console.log(response); });
... or like this:
console.log(gapi.client.adwords)
but I can't figure out what I need to pass to gapi.client.request
and gapi.client.adwords
doesn't exist.
Is it possible that I'm not passing a discoveryDoc
or something like that? Where is the discoveryDoc
for AdWords?
scope: "https://www.googleapis.com/auth/adwords", discoveryDocs: ["???"]
Use Case: I'm trying to get a list of MCC/AdWords/Ad Manager accounts (specifically their ID's and names) that are associated with (or owned by) the authenticated user.
Thanks in advance!