Hi,
I'm using google ads new api to create campaign. After I'v created a budget
& a bidding strategy successfully, I failed to create the app using
following code:
Campaign.newBuilder()
.setName(StringValue.of(request.name))
.setAdvertisingChannelType(AdvertisingChannelTypeEnum.AdvertisingChannelType.MULTI_CHANNEL)
// Recommendation: Set the request to PAUSED when creating it to
prevent the ads from immediately serving.
// Set to ENABLED once you've added targeting and the
ads are ready to serve
.setStatus(CampaignStatusEnum.CampaignStatus.PAUSED)
.setBiddingStrategy(StringValue.of(biddingStrategyResourceName))
.setCampaignBudget(StringValue.of(budgetResourceName))
.setNetworkSettings(networkSettings)
.setStartDate(StringValue.of(request.startDate.createCampaignFormat()))
.setEndDate(StringValue.of(request.startDate.createCampaignFormat()))
.build()
I receive below error and can't understand why:
Request
-------
MethodName: google.ads.googleads.v1.services.CampaignService/MutateCampaigns
Endpoint: googleads.googleapis.com:443
Headers: {developer-token=REDACTED, x-goog-api-client=gl-java/1.8.0_172
gapic/ gax/1.35.0 grpc/1.16.1}
Body: customer_id: "9981465***"
operations {
create {
name {
value: "Campaign Mohammad Reza Kiani 1556538987995"
}
status: PAUSED
campaign_budget {
value: "customers/9981465***/campaignBudgets/1898509417"
}
advertising_channel_type: MULTI_CHANNEL
network_settings {
target_google_search {
value: true
}
target_search_network {
value: true
}
target_content_network {
}
target_partner_search_network {
}
}
start_date {
value: "20190430"
}
end_date {
value: "20190430"
}
bidding_strategy {
value: "customers/9981465***/biddingStrategies/1946898398"
}
}
}
Response
--------
Headers:
Metadata(content-type=application/grpc,request-id=3fml6VHnqNvxnIwkv6RjuQ,date=Mon,
29 Apr 2019 11:56:39 GMT,alt-svc=quic=":443"; ma=2592000; v="46,44,43,39")
Body: null
Failure message: errors {
error_code {
operation_access_denied_error: CREATE_OPERATION_NOT_PERMITTED
}
message: "Unauthorized CREATE operation in invoking a service\'s mutate
method."
trigger {
string_value: ""
}
location {
field_path_elements {
field_name: "operations"
index {
}
}
}
}
Can you help me? Thanks
(I've hidden my 3 last digits of customer id)
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
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/4779aafa-6cd6-4c77-a724-6b3cf2c13800%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.