Hi Imran,
OperationAccessDenied.OPERATION_NOT_PERMITTED_FOR_CAMPAIGN_TYPE error usually occurs when the operation is not permitted on the campaign type. Since you are trying to create a mobile app campaign, you may refer to this blog post and you may need to update your code based on the changes discussed in the blog.
If the issue still persists after updating your code, so I can further investigate the issue, could you provide the complete SOAP request and response logs via Reply privately to author? If you haven't enabled logging, you may enable the SOAP logging by referring to this guide.
Regards,
Hiroyuki
Google Ads API Team
Hi Imran,
Unfortunately, we don't have the exact sample code that you are looking for. You may specify the UniversalAppCampaignInfo in your API call instead of UniversalAppCampaignSetting.
If you are encountering any issues while you update your code, I would suggest that you reach out to the owners of the client library as they are more equipped to answer to your questions.
Regards,
Hiroyuki
Google Ads API Team
Hi Imran,
Thank you for providing the further details.
You may refer to this guide for more details about the UniversalAppCampaignInfo type and try to implement similar code below:
UniversalAppCampaignInfo appCampaignInfo = new UniversalAppCampaignInfo();
appCampaignInfo.biddingStrategyGoalType(INSERT_TYPE_HERE);
appCampaignInfo.setAppId(INSERT_ID_HERE);
appCampaignInfo.setAppVendor(INSERT_VENDOR_HERE);
Campaign campaign = new Campaign();
campaign.setName("INSERT_CAMPAIGN_NAME_HERE");
campaign.setStatus(CampaignStatus.PAUSED);
campaign.setUniversalAppCampaignInfo(appCampaignInfo);
Please let me know if you have further clarifications.
Regards,
Hiroyuki
Google Ads API Team