Tuesday, 22 December 2015

Is it possible to determine access level of google account through which my app connects to adwords?

I am trying to implement OfflineConversionTracking as follows:

ConversionTrackerServiceInterface conversionTrackerService = new AdWordsServices().get(session, ConversionTrackerServiceInterface.class);

ConversionTrackerOperation uploadConversionOperation = new ConversionTrackerOperation();

uploadConversionOperation.setOperator(Operator.ADD);

uploadConversionOperation.setOperand(operandVariable);

ConversionTrackerReturnValue conversionTrackerReturnValue = conversionTrackerService.mutate(new ConversionTrackerOperation[] {uploadConversionOperation });


for some accounts call to conversionTrackerService.mutate results in OperationAccessDenied.ACTION_NOT_PERMITTED exception being thrown. 

Given the explanation of the error here: https://developers.google.com/adwords/api/docs/reference/v201509/OfflineConversionFeedService, it is my understanding that the authenticated google account doesn't have permissions to modify target adwords account. 

The question is:
How does one check if an authenticated google account has a permission to modify target adwords account before attempting a mutate call?
It would be useful to catch this right after completion of oauth flow and suggest a corrective action to a user.


--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
 
You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups "AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/96a12899-d9e4-432a-9fc4-e1ec849f96fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment