.net Webforms oauth

12 views
Skip to first unread message

han...@outlook.de

unread,
Jan 2, 2019, 5:01:33 AM1/2/19
to AdWords API and Google Ads API Forum
I am lost in docs

I have a developer token and ClientCustomerId. Try to get access with the .net lib to my Ads (read write), based on server to Api calls
Confused by oauth2. Oauth is a in person authentication 
1) why I need this? or can i keep it empty in web.config
2) to get a OAuth2ClientId and OAuth2ClientSecret - I have to buy a Google Apps Domain? 
3) what is the purpose of that .Json (generate private Key) 

-Hannes

Milind Sankeshware (AdWords API Team)

unread,
Jan 2, 2019, 3:39:39 PM1/2/19
to AdWords API and Google Ads API Forum
Hi Hannes,

Please find my inline responses:


1) why I need this? or can i keep it empty in web.config
To make the the API call against the AdWords account you will need to add the OAuth credentials in the config file. OAuth2 enables your AdWords API client app to access a user's Google Ads account without having to handle or store the user's login info. These credentials should not be empty. 

2) to get a OAuth2ClientId and OAuth2ClientSecret - I have to buy a Google Apps Domain? 
No, you will not require to buy domain. You can just create the client id and secret by following the steps in this guide

3) what is the purpose of that .Json (generate private Key)
If you are looking for service account then you will need to create the JSON file. If you would like to remove the user intervention in OAuth flow, then you can use the OAuth service account. You can create the service account by following the steps in this document. Please note that we strongly recommend using installed app or web flows instead of service accounts unless you need domain-specific features.

Let me know if you have any further questions. 

Thanks,
Milind, AdWords API Team
Reply all
Reply to author
Forward
0 new messages