Reputation: 173
I have a problem during creating the campaign. I have test account on google Adwords. I used code from google: AddCampaigns.java
Im getting error:
[OperationAccessDenied.ADD_OPERATION_NOT_PERMITTED @ class campaignmgmt.campaign.MutateAction (ADD) requires CREATE_CAMPAIGN, OperationAccessDenied.ADD_OPERATION_NOT_PERMITTED @ class campaignmgmt.campaign.MutateAction (ADD) requires CREATE_CAMPAIGN]
It occurs in line:
// Add campaigns.
CampaignReturnValue result = campaignService.mutate(operations);
I found one problem this type on a google dev webpage, however the 'solution' did not help. Anyone have any idea why is it happening?
Thank you so much and have a nice day!
Upvotes: 1
Views: 437
Reputation: 779
I solved it setting the clientCustomerId. With Google AdWords Account you can manage several clients account with several campaigns.
Example of my c# code:
// Get the CampaignService.
CampaignService campaignService =
(CampaignService)_user.GetService(AdWordsService.v201409.CampaignService);
// Set ClientCustomerId
campaignService.RequestHeader.clientCustomerId = myClientCustomerId;
Upvotes: 1