About pushing Offline conversion

43 views
Skip to first unread message

pankaj grover

unread,
Jun 29, 2018, 12:06:45 AM6/29/18
to AdWords API and Google Ads API Forum
Hello team, we are building web application using .NET and integrated Adwords api for pushing offline conversation to our user's adwords account.
1) When we authorize a user with his adwords account then we get the Access token and Refresh Token for that account this is fine.

2) But when we authorize the same user again this time we are not getting the Refresh token for that account.

3) In both cases we are not getting any unique thing for adwords account.

4) After authorization we are showing the list of their customer Ids they have in their adwords account and then user select any one of them and we are saving the Access token and Refresh Token in our database.

5) Now, the problem comes that user doesn't select customer Id and leave our application and when he comes back to our application and authorize his account again this time we are not getting the Refresh Token because we already have that but how can we ensure that the Refresh Token we have
belong to the same adwords account.

Finally question is that we have Refresh Tokens for many user's adwords account.How can we ensure that one belong to which adwords account.

Peter Oliquino (AdWords API Team)

unread,
Jun 29, 2018, 2:50:33 AM6/29/18
to AdWords API and Google Ads API Forum
Hi,

My apologies if I am not familiar with the implementation you have applied in your application. However, in regards to keeping track of OAuth2 credentials of a specific account, I would recommend that you store them in local file such as the one described in this guide. You should then be able to programmatically point to the directory of the configuration file based on which account it belongs to so that your application can then use it before sending the request.

Also, access tokens need not be stored, since it is automatically regenerated when using a client library of the AdWords API. I hope this helps and feel free to write back if you require further information.

Thanks and regards,
Peter
AdWords API Team

pankaj grover

unread,
Jul 2, 2018, 11:51:28 PM7/2/18
to AdWords API and Google Ads API Forum
Hi peter, we are storing the Refresh Token when user authorize his ad-words account through our application.But we need a unique identity that describes the user ad-words account because we need this later in our application as we we want some action with the same ad-words account when user again authorize his account.
Can we have any identity that describes the particular ad-words account while authorization.

Peter Oliquino (AdWords API Team)

unread,
Jul 3, 2018, 4:35:07 AM7/3/18
to AdWords API and Google Ads API Forum
Hi Pankaj,

Since your issue is already more specific to the .NET client library, I would recommend that you get in touch with them directly via this link for further assistance as they may have suggestions on how you can programmatically implement an account-OAuth2 credentials authentication system, using a database, on your end.
Reply all
Reply to author
Forward
0 new messages