1

I am creating a lambda function to get data from Google API. I get the following error:

Failed to launch browser with "https://accounts.google.com/o/oauth2/v2/auth?access_type=offline&response_type=code&client_id=XRARESRAS"

Is there a way that I can authorize the api access without launching the browser. I am using Google.apis.Doubleclicksearch.v2

Linda Lawton - DaImTo
  • 106,405
  • 32
  • 180
  • 449
  • see https://stackoverflow.com/questions/19766912/how-do-i-authorise-an-app-web-or-installed-without-user-intervention/19766913#19766913 – pinoyyid Oct 16 '19 at 18:46

1 Answers1

1

The way Oauth2 works is that a browser page is displayed to the user which they can approve your deny your application access to their data. There is no way around that. A user needs to approve your access and to do that they must see it in a browser.

If this account you are trying to connect to is your own then you should look into creating a service account and adding the service account email address as a user to Search Ads 360. However it will depend upon the language you are using wither or not you can use a service account they are intended mostly for server to server communication.

Linda Lawton - DaImTo
  • 106,405
  • 32
  • 180
  • 449