INVALID_CUSTOMER_FOR_CLICK on uploading offline conversion

2022-07-22 Thread Walter Bodwell
I'm trying to upload an offline conversion.  I'm using a manager account to 
make the changes (9567076910).  The conversion action has an owner_customer 
of "customers/6141913992".  That's the customer_id I'm using.

Here is the customer.conversion_tracking_setting:
  customer {
resource_name: "customers/6141913992"
conversion_tracking_setting {
  conversion_tracking_id: 810169330
  google_ads_conversion_customer: "customers/6141913992"
}
  }
So according 
to 
https://developers.google.com/google-ads/api/docs/conversions/overview#effective_conversion_account,
  
the account is not using cross-account conversion tracking, and conversion 
tracking is enabled.

# Here's the operation:
conversion = client.get_type("ClickConversion")
conversion.conversion_action = 
'customers/6141913992/conversionActions/971368021'
conversion.gclid = ' 
CjwKCAjwx46TBhBhEiwArA_DjNNPxXwY-SFHyPPRWkaLHJUE_0bsXrRb3hpISdpoJwtYRM3bCW2LhRoCnPAQAvD_BwE'
conversion.conversion_value =  4.2304
conversion.conversion_date_time = '2022-04-23 10:52:00-07:00'
conversion.currency_code = 'GBP'

# And the upload
conversion_upload_service = client.get_service("ConversionUploadService")
request = client.get_type("UploadClickConversionsRequest")
request.customer_id = '6141913992'
request.conversions.append(conversion)
request.partial_failure = True
conversion_upload_service.upload_click_conversions(request=request)

I'm getting the following error response:
partial_failure_error {
  code: 3
  message: "The click associated with the given identifier or iOS URL 
parameter isn\'t from the account where conversion tracking is set up., at 
conversions[0].gclid"
  details {
type_url: 
"type.googleapis.com/google.ads.googleads.v10.errors.GoogleAdsFailure"
value: "\n\201\002\n\003\370\006\036\022\177The click associated with 
the given identifier or iOS URL parameter isn\'t from the account where 
conversion tracking is set 
up.\032]*[CjwKCAjwx46TBhBhEiwArA_DjNNPxXwY-SFHyPPRWkaLHJUE_0bsXrRb3hpISdpoJwtYRM3bCW2LhRoCnPAQAvD_BwE\"\032\022\017\n\013conversions\030\000\022\007\n\005gclid"
  }
}
results {
}

We have another customer with similar settings (using the same manager 
account, not using cross-account conversion tracking, conversion tracking 
enabled, owner is the same as the account) and it is not seeing similar 
issues.

Any suggestions on what I need to look at to address the issue?
Thanks,
Walter

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/c92a4c03-ebf0-40d0-9bed-32fe6cea5884n%40googlegroups.com.


Re: Trouble getting partial failures

2022-04-11 Thread Walter Bodwell
Thanks for your response.  I am checking the code after getting the 
partial_failure_error.   The problem is that the partial_failure_error is 
None (i.e., not present).

Thanks,
Walter

On Thursday, April 7, 2022 at 9:15:34 PM UTC-5 adsapi wrote:

> Hi Walter,
>
> Thank you for raising this concern to the Google Ads API team.
>
> Moving forward to your concern, as per this document 
> ,
>  
> in Python the partial_failure_error attr is always present on a response 
> message and is represented by a google.rpc.Status message. So we can't 
> simply check whether the field is present, we must check that the code is 
> *non-zero*.
>
> Let us know if this is what you're looking for.
>
> Regards,
> [image: Google Logo] 
> Carmela 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q2ZKslq: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/694a8f16-a0d8-4fa9-9769-9b637815f616n%40googlegroups.com.


Trouble getting partial failures

2022-04-07 Thread Walter Bodwell
I'm uploading offline conversions.  Most are successful (and I can see them 
in the Google Ads UI).  Some are not.  I'm having difficulty getting an 
error message for the unsuccessful ones.

Here's my Python code:

# create conversion
click_conversion = client.get_type("ClickConversion")
click_conversion.conversion_action = conversion_action
click_conversion.gclid = click_id
if conversion_value is not None:
click_conversion.conversion_value = float(conversion_value)
click_conversion.conversion_date_time = conversion_time
click_conversion.currency_code = conversion_currency_code

# upload conversion
conversion_upload_service = client.get_service("ConversionUploadService")
request = client.get_type("UploadClickConversionsRequest")
request.customer_id = customer_id
request.conversions.append(click_conversion)
request.partial_failure = True
offline_conversion_responses = 
conversion_upload_service.upload_click_conversions(request=request).results

# process response
for response in offline_conversion_responses:
partial_failure = getattr(response, "partial_failure_error", None)
code = getattr(partial_failure, "code", None)
if code != 0:
error_details = getattr(partial_failure, "details", [])
errors = []
for error_detail in error_details:
failure_message = client.get_type("GoogleAdsFailure")
GoogleAdsFailure = type(failure_message)
failure_object = 
GoogleAdsFailure.deserialize(error_detail.value)
for error in failure_object.errors:
errors.append(error.message)
error_message = 'Unknown Error' if len(errors) == 0 else '; 
'.join(errors)

The problem is partial_failure always seems to be None regardless of 
whether it was successful.

Any suggestions?

Thanks,
Walter

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/eb1a64c1-acc3-4243-b815-baf7e93cb86bn%40googlegroups.com.


Re: Request is missing required authentication credential

2022-02-07 Thread Walter Bodwell
I see what I did wrong.  For the production account, I need to use the 
AdWords developer token.  I was erroneously using the access token from 
OAuth.  The sandbox account must have let me slide on this.  The production 
account, not so much.

Walter

On Monday, February 7, 2022 at 9:30:36 AM UTC-6 Walter Bodwell wrote:

> I have two Google OAuth applications.  One is used for testing and hits a 
> sandbox account.  The other just got verified for production use and is 
> hitting our production account.
>
> The sandbox version is working just fine.  The same code fails on the 
> production version.
>
> When I try to call the new Google Ads API using the production version, 
> I'm getting:
> google.ads.googleads.errors.GoogleAdsException: 
> (<_SingleThreadedRendezvous of RPC that terminated with: status = 
> StatusCode.UNAUTHENTICATED details = "Request is missing required 
> authentication credential. Expected OAuth 2 access token, login cookie or 
> other valid authentication credential. See 
> https://developers.google.com/identity/sign-in/web/devconsole-project.; 
> debug_error_string = 
> "{"created":"@1644245725.347305819","description":"Error received from peer 
> ipv4:142.250.73.202:443","file":"src/core/lib/surface/call.cc","file_line":1074,"grpc_message":"Request
>  
> is missing required authentication credential. Expected OAuth 2 access 
> token, login cookie or other valid authentication credential. See 
> https://developers.google.com/identity/sign-in/web/devconsole-project.","grpc_status":16};
>  
> >, <_SingleThreadedRendezvous of RPC that terminated with: status = 
> StatusCode.UNAUTHENTICATED details = "Request is missing required 
> authentication credential. Expected OAuth 2 access token, login cookie or 
> other valid authentication credential. See 
> https://developers.google.com/identity/sign-in/web/devconsole-project.; 
> debug_error_string = 
> "{"created":"@1644245725.347305819","description":"Error received from peer 
> ipv4:142.250.73.202:443","file":"src/core/lib/surface/call.cc","file_line":1074,"grpc_message":"Request
>  
> is missing required authentication credential. Expected OAuth 2 access 
> token, login cookie or other valid authentication credential. See 
> https://developers.google.com/identity/sign-in/web/devconsole-project.","grpc_status":16};
>  
> >, errors { error_code { authentication_error: AUTHENTICATION_ERROR } 
> message: "Authentication of the request failed." } request_id: 
> "fPZpK5epSvpfmvbC3luD-w" , 'fPZpK5epSvpfmvbC3luD-w')
>
> When I try to call the old Google AdWords API with the production version, 
> I'm getting:
> googleads.errors.AdWordsReportBadRequestError: Type: 
> QuotaCheckError.INVALID_TOKEN_HEADER
>
> I've verified the client id, client secret, token and refresh token and it 
> matches what I used / got when I went through the Oauth process (i.e., I'm 
> not mixing the sandbox and production credentials).
>
> The only noticeable difference between the sandbox and production 
> credentials is that the token is much longer for production (163 characters 
> for production; only 22 for sandbox)
>
> Thanks for your help,
> Walter
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/4deaaed1-b9dc-4f8b-b0a4-2f9207e5cf21n%40googlegroups.com.


Request is missing required authentication credential

2022-02-07 Thread Walter Bodwell
I have two Google OAuth applications.  One is used for testing and hits a 
sandbox account.  The other just got verified for production use and is 
hitting our production account.

The sandbox version is working just fine.  The same code fails on the 
production version.

When I try to call the new Google Ads API using the production version, I'm 
getting:
google.ads.googleads.errors.GoogleAdsException: (<_SingleThreadedRendezvous 
of RPC that terminated with: status = StatusCode.UNAUTHENTICATED details = 
"Request is missing required authentication credential. Expected OAuth 2 
access token, login cookie or other valid authentication credential. See 
https://developers.google.com/identity/sign-in/web/devconsole-project.; 
debug_error_string = 
"{"created":"@1644245725.347305819","description":"Error received from peer 
ipv4:142.250.73.202:443","file":"src/core/lib/surface/call.cc","file_line":1074,"grpc_message":"Request
 
is missing required authentication credential. Expected OAuth 2 access 
token, login cookie or other valid authentication credential. See 
https://developers.google.com/identity/sign-in/web/devconsole-project.","grpc_status":16};
 
>, <_SingleThreadedRendezvous of RPC that terminated with: status = 
StatusCode.UNAUTHENTICATED details = "Request is missing required 
authentication credential. Expected OAuth 2 access token, login cookie or 
other valid authentication credential. See 
https://developers.google.com/identity/sign-in/web/devconsole-project.; 
debug_error_string = 
"{"created":"@1644245725.347305819","description":"Error received from peer 
ipv4:142.250.73.202:443","file":"src/core/lib/surface/call.cc","file_line":1074,"grpc_message":"Request
 
is missing required authentication credential. Expected OAuth 2 access 
token, login cookie or other valid authentication credential. See 
https://developers.google.com/identity/sign-in/web/devconsole-project.","grpc_status":16};
 
>, errors { error_code { authentication_error: AUTHENTICATION_ERROR } 
message: "Authentication of the request failed." } request_id: 
"fPZpK5epSvpfmvbC3luD-w" , 'fPZpK5epSvpfmvbC3luD-w')

When I try to call the old Google AdWords API with the production version, 
I'm getting:
googleads.errors.AdWordsReportBadRequestError: Type: 
QuotaCheckError.INVALID_TOKEN_HEADER

I've verified the client id, client secret, token and refresh token and it 
matches what I used / got when I went through the Oauth process (i.e., I'm 
not mixing the sandbox and production credentials).

The only noticeable difference between the sandbox and production 
credentials is that the token is much longer for production (163 characters 
for production; only 22 for sandbox)

Thanks for your help,
Walter

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/24a30198-d52d-4cb8-a7ca-1a0d0a3961adn%40googlegroups.com.


Finding Google Oauth Application

2021-12-15 Thread Walter Bodwell
We're having issues finding our Oauth application from within our various 
Google accounts (looking at 
https://console.cloud.google.com/apis/credentials for each project of each 
account that we're aware of).  Is there an easy way to determine which 
account it is in (say an email) given a client id?

Thanks,
Walter

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"AdWords API and Google Ads 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/b5e94ece-5c05-46ff-b956-9db955330b11n%40googlegroups.com.