Re: Digest for adwords-api@googlegroups.com - 4 updates in 4 topics

79 views
Skip to first unread message

Rungrot Oranon

unread,
Dec 27, 2022, 3:59:18 AM12/27/22
to adwor...@googlegroups.com
Thanks you bro

[[Rungrot_Saibutdee]]

ในวันที่ จ. 26 ธ.ค. 2022 17:58 น. <adwor...@googlegroups.com> เขียนว่า:
Tiansi Liu <tians...@gmail.com>: Dec 26 02:34AM -0800

Hi,
I’m trying to get the status of PMax Assets as following UI screenshot,
1. How to get this status?
2. What's the difference between PolicyApprovalStatus
<https://developers.google.com/google-ads/api/reference/rpc/v12/PolicyApprovalStatusEnum.PolicyApprovalStatus>
and PolicyReviewStatus
<https://developers.google.com/google-ads/api/reference/rpc/v12/PolicyReviewStatusEnum.PolicyReviewStatus>?
Can I assume that if PolicyApprovalStatus is UNKNOWN or UNSPECIFIED, the
asset is still under review?
[image: 4871672050662_.pic.jpg]
Looking forward to your reply.
 
Thanks,
Tiansi
Edgar Leroux <edgar....@papernest.com>: Dec 26 02:19AM -0800

Hello,
 
When I try to use the add_offline_user_data_job_operations method from
google ads python package i get the following error even tho I upgraded the
version to "v12" and the package google-ads to its latest version :
 
File
"/hexagonal_job_template/hexagon/application/application_framework.py",
line 112, in execute_application
 
self.application.execute(target_provider)
 
File "/hexagonal_job_template/hexagon/context.py", line 187, in wrapper
 
return fn(*args, **kwargs)
 
File
"/hexagonal_job_template/hexagon/application/custom/gads_remarketing.py",
line 30, in execute
 
service.upload_data(query_name)
 
File "/hexagonal_job_template/hexagon/infra/gads_connector.py", line 592,
in upload_data
 
self.insert_data_list(resource_name, hashed_email_list)
 
File "/hexagonal_job_template/hexagon/infra/gads_connector.py", line 501,
in insert_data_list
 

offline_user_data_job_service_client.add_offline_user_data_job_operations(
 
File
"/usr/local/lib/python3.9/site-packages/google/ads/googleads/v12/services/services/offline_user_data_job_service/client.py",
line 591, in add_offline_user_data_job_operations
 
response = rpc(
 
File
"/usr/local/lib/python3.9/site-packages/google/api_core/gapic_v1/method.py",
line 154, in __call__
 
return wrapped_func(*args, **kwargs)
 
File
"/usr/local/lib/python3.9/site-packages/google/api_core/grpc_helpers.py",
line 72, in error_remapped_callable
 
return callable_(*args, **kwargs)
 
File "/usr/local/lib/python3.9/site-packages/grpc/_interceptor.py", line
247, in __call__
 
response, ignored_call = self._with_call(request,
 
File "/usr/local/lib/python3.9/site-packages/grpc/_interceptor.py", line
290, in _with_call
 
return call.result(), call
 
File "/usr/local/lib/python3.9/site-packages/grpc/_interceptor.py", line
146, in result
 
raise self._exception
 
File "/usr/local/lib/python3.9/site-packages/grpc/_interceptor.py", line
274, in continuation
 
response, call = self._thunk(new_method).with_call(
 
File "/usr/local/lib/python3.9/site-packages/grpc/_interceptor.py", line
301, in with_call
 
return self._with_call(request,
 
File "/usr/local/lib/python3.9/site-packages/grpc/_interceptor.py", line
290, in _with_call
 
return call.result(), call
 
File "/usr/local/lib/python3.9/site-packages/grpc/_interceptor.py", line
146, in result
 
raise self._exception
 
File "/usr/local/lib/python3.9/site-packages/grpc/_interceptor.py", line
274, in continuation
 
response, call = self._thunk(new_method).with_call(
 
File "/usr/local/lib/python3.9/site-packages/grpc/_interceptor.py", line
301, in with_call
 
return self._with_call(request,
 
File "/usr/local/lib/python3.9/site-packages/grpc/_interceptor.py", line
287, in _with_call
 
call = self._interceptor.intercept_unary_unary(continuation,
 
File
"/usr/local/lib/python3.9/site-packages/google/ads/googleads/interceptors/exception_interceptor.py",
line 99, in intercept_unary_unary
 
self._handle_grpc_failure(response)
 
File
"/usr/local/lib/python3.9/site-packages/google/ads/googleads/interceptors/exception_interceptor.py",
line 71, in _handle_grpc_failure
 
raise self._get_error_from_response(response)
 
google.ads.googleads.errors.GoogleAdsException: (<_InactiveRpcError of RPC
that terminated with:
 
status = StatusCode.INVALID_ARGUMENT
 
details = "Request contains an invalid argument."
 
debug_error_string = "UNKNOWN:Error received from peer
ipv4:142.250.178.138:443
{created_time:"2022-12-26T10:04:24.807792876+00:00", grpc_status:3,
grpc_message:"Request contains an invalid argument."}"
 
>, <_InactiveRpcError of RPC that terminated with:
 
status = StatusCode.INVALID_ARGUMENT
 
details = "Request contains an invalid argument."
 
debug_error_string = "UNKNOWN:Error received from peer
ipv4:142.250.178.138:443
{created_time:"2022-12-26T10:04:24.807792876+00:00", grpc_status:3,
grpc_message:"Request contains an invalid argument."}"
 
>, errors {
 
error_code {
 
request_error: UNKNOWN
 
}
 
message: "The error code is not in this version."
 
}
 
request_id: "PPRxsFZDJhK_Q4WUrkAtLA"
 
, 'PPRxsFZDJhK_Q4WUrkAtLA')
 
Thanks for your help !
Ryo <ryoma...@antway.co.jp>: Dec 26 01:00AM -0800

Thank you for reading my question.
 
I have a question about cause of the ACTION_NOT_PERMITTED error.
 
I requested basic access of the Google Ads API and I was approved.
Moreover, I can request customers:listAccessibleCustomers API.
 
What's the cause of the error?
Where should I get the additional permission? In the Google Ads account,
Google Ads account(MCC), OAuth or what...?
 
# request(Node.js)
## request access_token
await fetch('https://www.googleapis.com/oauth2/v3/token', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
grant_type: 'refresh_token',
client_id: clientId,
client_secret: clientSecret,
refresh_token: refreshToken,
}),
});
 
## call the API
await
fetch('https://googleads.googleapis.com/v12/customers/${customerId}:uploadConversionAdjustments',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${accessToken}`,
'developer-token': developerToken // from the API center of the MCC
account
},
body: JSON.stringify({
conversionAdjustments: [
{
adjustment_type: 'ENHANCEMENT',
userIdentifiers: [
{
addressInfo: {
hashed_first_name: convertToSHA256(firstName),
hashed_last_name: convertToSHA256(lastName),
postal_code: convertToSHA256(postalCode),
state: convertToSHA256(prefecture),
city: convertToSHA256(city),
hashed_street_address: convertToSHA256(streetAddress),
}
}
],
orderId,
conversionAction,
}
],
partialFailure: true,
validateOnly: true
}),
});
 
 
# response
"error":{"code":403,"message":"The caller does not have
permission","status":"PERMISSION_DENIED","details":[{"@type":"type.googleapis.com/google.ads.googleads.v12.errors.GoogleAdsFailure","errors":[{"errorCode":{"authorizationError":"ACTION_NOT_PERMITTED"},"message":"The
user does not have permission to perform this action on the resource or
call a method."}],"requestId":""}]}}
"Vasyl K." <v.kos...@gmail.com>: Dec 26 12:55AM -0800

Hi Nirmita,
Thank you for answering.
You said image extension as an asset is not supported in the Google Ads API
and in the same time you've sent the link to a guide for uploading image
assets via some script
https://developers.google.com/google-ads/api/samples/upload-image-asset.
Does this guide not refer to Google Ads API?
 
Regards,
Vasyl
 
On Thursday, December 22, 2022 at 5:04:54 PM UTC+2 adsapi wrote:
 
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to adwords-api...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages