Re: getting error while creating video campaign in google ads api

2023-04-18 Thread Ashish Chaturvedi (Ashu)


Hello!

Thank you for your quick reply. I would like to confirm if it is possible 
to create a Responsive Display Ad ('advertising_channel_type' => 
AdvertisingChannelType::DISPLAY) using the Google Ads API.

If yes, I would also like to know the limitations on the Responsive Display 
Ad that can be created using the Google Ads API.

It would be great if you could provide me with this information.

Thank you!


On Tuesday, 18 April 2023 at 17:06:21 UTC+5:30 Google Ads API Forum Advisor 
wrote:

> Hi Ashish,
>
> Thank you for reaching out to the Google Ads API support team. I hope that 
> you are doing well today.
>
> I understand that your concern is about creating Video campaigns via API. 
> Note that this is not possible as it is documented here in this link (
> https://developers.google.com/google-ads/api/docs/campaigns/overview#differences_from_the_google_ads_ui)
>  
> "*Not all campaign types in the Google Ads UI are supported in the API, 
> such as **Video Campaigns**. Video campaign metrics are available for 
> retrieval in the API. However, **video campaigns cannot be mutated at all 
> from the API**, including simple operations such as pausing or enabling 
> as well as complex operations like organizing, changing criteria, or adding 
> ad groups.*"
>
> In addition, there is no Beta version of this campaign and even if you 
> upgrade your Developer Token Access from Basic to Standard, it will not 
> enable you to create Video campaigns via API.
>
> I hope this clears out your concern.
>
> Kind regards, 
> [image: Google Logo] Google Ads API Team 
>
> ref:_00D1U1174p._5004Q2knXap:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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+unsubscr...@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 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/cf759341-5628-4a97-8e29-312533444696n%40googlegroups.com.


Getting Error While creating Video Campaign in Google Ads API

2023-04-18 Thread Ashish Chaturvedi (Ashu)


Hello,

I'm trying to create a video campaign using the Google Ads API, based on 
the documentation for Campaigns in version 13: 
https://developers.google.com/google-ads/api/reference/rpc/v13/Campaign. 
I'm also referencing the video channel type documentation here: 
https://developers.google.com/google-ads/api/reference/rpc/v13/AdvertisingChannelTypeEnum.AdvertisingChannelType
.

However, when I try to create my campaign, I'm encountering an error.

{
"message": "Request contains an invalid argument.",
"code": 3,
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": 
"type.googleapis.com\/google.ads.googleads.v13.errors.GoogleAdsFailure",
"errors": [
{
"errorCode": {
"mutateError": "MUTATE_NOT_ALLOWED"
},
"message": "Mutates are not allowed for the requested 
resource.",
"trigger": {
"stringValue": "VIDEO"
},
"location": {
"fieldPathElements": [
{
"fieldName": "operations",
"index": 0
}
]
}
},
{
"errorCode": {
"contextError": 
"OPERATION_NOT_PERMITTED_FOR_CONTEXT"
},
"message": "The operation is not allowed for the given 
context.",
"trigger": {
"stringValue": "MANUAL_CPC"
},
"location": {
"fieldPathElements": [
{
"fieldName": "operations",
"index": 0
},
{
"fieldName": "create"
},
{
"fieldName": "manual_cpc"
}
]
}
}
],
"requestId": "vyH2QzTeEcbk6SNicNHJrA"
}
]
}

My Code is 
try {
// Creates a single shared budget to be used by the campaigns added below.
$budgetResourceName = $this->addCampaignBudget($customerId, $refreshToken);
$budgetResourceName = json_decode($budgetResourceName->getContent(),true);
// Configures the campaign network options.
$networkSettings = new NetworkSettings([
'target_google_search' => true,
'target_search_network' => true,
'target_content_network' => true,
'target_partner_search_network' => true
]);
$campaignOperations = [];
$params['name'] = 'VIDEO Campaign';
$params['advertising_channel_type'] = AdvertisingChannelType::VIDEO;
$params['manual_cpc'] = new ManualCpc();
$params['campaign_budget'] = $budgetResourceName['response'];
$params['network_settings'] = $networkSettings;
$params['start_date'] = date('Ymd', strtotime('+1 day'));
$params['end_date'] = date('Ymd', strtotime('+1 month'));
$campaign = new Campaign($params);
// Creates a campaign operation.
$campaignOperation = new CampaignOperation();
$campaignOperation->setCreate($campaign);
$campaignOperations[] = $campaignOperation;

// Issues a mutate request to add campaigns.
$googleAdsClient = $this->googleAdsClient($refreshToken);
$campaignServiceClient = $googleAdsClient->getCampaignServiceClient();
$response = $campaignServiceClient->mutateCampaigns($customerId, 
$campaignOperations);
foreach ($response->getResults() as $addedCampaign) {
$addedCampaignResult = $addedCampaign->getResourceName();
}
$resultResponse = [];
if($addedCampaignResult) {
$resultResponse['name'] = $addedCampaignResult;

$resultResponse['status'] = CampaignStatus::PAUSED;
preg_match('/customers\/(\d+)/', $addedCampaignResult, $matches);
$resultResponse['customerId'] = $matches[1];

// Extract campaign ID
preg_match('/campaigns\/(\d+)/', $addedCampaignResult, $matches);
$resultResponse['campaignId'] = $matches[1];
$resultResponse['id'] = $matches[1];
}
return response()->json(['status' => 1, 'response' => $resultResponse]);
} catch (ApiException $apiException) {
return response()->json(['status' => 0, 'error' => 
$apiException->getMessage(), 'errorMessage' => $apiException->getMessage(), 
'error_type' => 'campaign', 'response' => null]);
}


   - I would like to confirm whether video campaigns are supported in the 
   Google Ads API or not.
   - 
   - Is the video campaign feature still in beta version of Google Ads API? 
   Could this be the reason why I am getting the error "A mutate action is not 
   allowed on this resource, from this client"?
   - 
   - If the video campaign feature is in beta, how can I request access to 
   the beta version?
   - 
   - I noticed that I only have basic API access. If I request standard API 

Re: video Campaign in google ads API

2023-01-25 Thread 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
Hi Anurag,

Thanks for showing an interest on the creating Video campaigns creation in 
Google Ads API. Our team does not have any updates regarding when the creation 
of Video campaigns via API will be available. However, our team already filed a 
feature request for this feature to be available in the API. Please note that 
this is a subject for review and what we can do for now is to advise you to 
keep an eye on our blog post for the updates and releases.

In the meantime, as a workaround, you may use Google Ads UI or Google Ads 
Scripts.

Regards,

Yasar
Google Ads API Team
ref:_00D1U1174p._5004Q2b6QOz:ref

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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+unsubscr...@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 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/dpEag0RP1LSV00P0MRBPrgS8uJqdZ1h5WV1w%40sfdc.net.


Re: video Campaign in google ads API

2023-01-24 Thread 'Anurag' via Google Ads API and AdWords API Forum
Hi Team,
are Video campaigns are now supported to create through APIs? I couldn't 
find info in release Doc.

Thanks and regards
Anurag

On Friday, June 10, 2022 at 3:14:10 PM UTC+5:30 kri...@skills-agency.com 
wrote:

> Thank you for the clarification.
> On Friday, June 10, 2022 at 2:12:52 PM UTC+5:30 adsapi wrote:
>
>> Hello,
>>
>> As discussed here 
>> ,
>>  
>> video campaign management is not currently supported in the API; thus, you 
>> cannot perform mutate operations on video campaigns, which is why your API 
>> request is failing.
>>
>> You can still retrieve video campaign metrics via the API, though.
>>
>> As for your following questions, this feature is not in beta and does not 
>> depend on the access level of your developer token: it is just not 
>> supported by the API at all.
>>
>> Sorry for the inconvenience.
>>
>> Thanks,
>>
>> Mattia Tommasone
>> Google Ads API Team
>>
>> ref:_00D1U1174p._5004Q2b6QOz:ref
>>
>
-- 


*Disclaimer: This email is
confidential, may be legally privileged, and 
is for the intended recipient
only. Access, disclosure, copying, 
distribution, or reliance on any of it by
anyone else is prohibited & may 
be a criminal offense. Please delete if
obtained in error & email 
confirmation to the sender.*

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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+unsubscr...@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 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/6fcc6a1e-791e-422e-aac4-cee6d7b156d6n%40googlegroups.com.


Re: video Campaign in google ads API

2022-06-10 Thread Krishnadas D
Thank you for the clarification.
On Friday, June 10, 2022 at 2:12:52 PM UTC+5:30 adsapi wrote:

> Hello,
>
> As discussed here 
> ,
>  
> video campaign management is not currently supported in the API; thus, you 
> cannot perform mutate operations on video campaigns, which is why your API 
> request is failing.
>
> You can still retrieve video campaign metrics via the API, though.
>
> As for your following questions, this feature is not in beta and does not 
> depend on the access level of your developer token: it is just not 
> supported by the API at all.
>
> Sorry for the inconvenience.
>
> Thanks,
>
> Mattia Tommasone
> Google Ads API Team
>
> ref:_00D1U1174p._5004Q2b6QOz:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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+unsubscr...@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 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/424fbc14-903e-4a9e-b581-9477d91922ecn%40googlegroups.com.


video Campaign in google ads API

2022-06-10 Thread Krishnadas D
Hi
i am trying to create video campaign using google ads API  by referencing  
https://developers.google.com/google-ads/api/reference/rpc/v10/Campaign this 
document 
and also i  refered  channel type video 
https://developers.google.com/google-ads/api/reference/rpc/v10/AdvertisingChannelTypeEnum.AdvertisingChannelType
 in 
here 

but when i create my campaign i am getting error like this
[ GoogleAdsError { error_code: ErrorCode { operation_access_denied_error: 6 
}, message: 'A mutate action is not allowed on this resource, from this 
client.', trigger: Value { string_value: 'VIDEO' }, location: ErrorLocation 
{ field_path_elements: [Array] } } ]

and my code is 

const customer = await this.client.Customer({
customer_id: customerId,
login_customer_id: mcc_id,
refresh_token: refreshToken,
});

const budgetResourceName = ResourceNames.campaignBudget(
customer.credentials.customer_id,
"-1"
);

const operations: MutateOperation[] = [
{
entity: "campaign_budget",
operation: "create",
resource: {
// Create a budget with the temporary resource id
resource_name: budgetResourceName,
name: subcampaign.name + "-budget",
delivery_method: enums.BudgetDeliveryMethod.STANDARD,
amount_micros: toMicros(subcampaign.budget),
},
},
{
entity: "campaign",
operation: "create",
resource: {
name: subcampaign.name,
advertising_channel_type: enums.AdvertisingChannelType.VIDEO,
status: enums.CampaignStatus.PAUSED,
bidding_strategy_type: enums.BiddingStrategyType.TARGET_CPM,
// Use the temporary resource id which will be created in the previous 
operation
campaign_budget: budgetResourceName,
network_settings: {
target_google_search: true,
target_search_network: true,
},
},
},
];

const result = await customer.mutateResources(operations);

so i like to confirm 

   - video campaign is supported in google ads api or not ?
   - video campaign is under beta version of google ads api ? may be 
   because of that i am getting error like "A mutate action is not allowed on 
   this resource, from this client." ?
   - if it is in beta , how can i request for beta access?
   - also i noticed that i have only basic api access , so if i request 
   standard api access it will work or not ?

Reply all
Reply to author
Forward

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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+unsubscr...@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 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/bf361d93-3186-4d03-b6d1-57e587248614n%40googlegroups.com.