Google Ads API Authetication error || Access denied

31 views
Skip to first unread message

Rajat Srivastava

unread,
Jan 6, 2021, 3:40:24 AM1/6/21
to AdWords API and Google Ads API Forum
Hello Everyone,

I am trying to make a call to google ads api using java client library.
I have followed the steps mentioned in the documentation and created my google ad manager account, a service account , one project and got the Oauth credentials as well.
But when I am trying to run AuthenticateInWebApplication.java which I got from github, I get one URL in the console to paste in the browser and get a code. At this steps, once I provide the credentials, I get below error(screenshot). And I am not sure where and what am I missing. It will be really a great help if someone can assist me with this issue.
Thanks in advance.


.
Thanks
Rajat

Google Ads API Forum Advisor Prod

unread,
Jan 6, 2021, 12:09:07 PM1/6/21
to rajatad...@gmail.com, adwor...@googlegroups.com

Hi Rajat,

Thank you for reaching out. The AuthenticateInWebApplication.java code sample is designed to generate the refresh token for the Web Application Flow. Please follow the instructions in this guide to generate the OAuth2 credentials using the Web Application Flow instead.

Thanks and regards,
Xiaoming, Google Ads API Team
 

Google Logo
Xiaoming
Google Ads API Team
 


ref:_00D1U1174p._5004Q2AHqib:ref
Reply all
Reply to author
Forward
0 new messages