We are trying to create some CRM based lists in AdWords via the API and are just getting started with it. We have run into an issue at the gates which is making it difficult to proceed. There appear to be no OAuth2 issues as we are not getting any "Authentication" errors, instead we are getting an "Authorization" error.
Details:
- The "ClientID" and associated "ClientSecret" are from a project under an account which has administrative permissions on the master.
- The "RefreshToken" was generated authorizing the same account as above to the AdWords scope.
- The "DeveloperToken" was generated on a different account under a different master which has basic API access.
- Using the C# GitHub managed code base for Google.Api.Ads.AdWords.v201509
ERROR: [AuthorizationError.USER_PERMISSION_DENIED @ ; trigger:'<null>']
Any insight on what could possibly be the issue here would be greatly appreciated.
This is the relevant portion of the code:
// Get Auth First
AdWordsUser awUser = new AdWordsUser();
// Get the UserListService.
AdwordsUserListService userListService =
(AdwordsUserListService)awUser.GetService(AdWordsService.v201509.AdwordsUserListService);
#region AddUserList and Populate Test
// Create remarketing user list.
CrmBasedUserList userList = new CrmBasedUserList()
{
name = "Test List 1",
description = "A list of customers that originated from email addresses",
membershipLifeSpan = 365L,
};
UserListOperation ulistop = new UserListOperation()
{
operand = userList,
@operator = Operator.ADD
};
var ulo = new UserListOperation[] { ulistop };
// Add user list.
UserListReturnValue result = userListService.mutate(ulo); <====ERROR OCCURS HERE