Oauth token HTTP header is malformed. in python official library issue

846 views
Skip to first unread message

Anil Kumar Meena

unread,
Nov 1, 2023, 12:04:58 PM11/1/23
to Google Ads API and AdWords API Forum
Hello, 
I have recently started work with the Google Ads client libraries and I picked the Python library.
I want to update the click conversion by using the offline example of code and I will try all to possible ways with different approaches, and getting the same error "Oauth token HTTP header is malformed " if anybody has any idea about the problem please share your valuable feedback to solve the problem. 
here is the full error description 
Request made: ClientCustomerId: 5260403480, Host: googleads.googleapis.com, Method: /google.ads.googleads.v15.services.ConversionUploadService/UploadClickConversions, RequestId: ttc94wkSSbLS3VNQ787qAA, IsFault: True, FaultMessage: Oauth token HTTP header is malformed.
Request with ID "ttc94wkSSbLS3VNQ787qAA" failed with status "UNAUTHENTICATED" and includes the following errors:
        Error with message "Oauth token HTTP header is malformed.".
let's join the conversation for more details 
thanks 


Google Ads API Forum Advisor

unread,
Nov 1, 2023, 6:03:00 PM11/1/23
to anilkum...@stepinsolutions.in, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

After reviewing your concern, I understand that you are encountering an error with the error message "Oauth token HTTP header is malformed." while trying to update the click conversion.

It appears that the credentials sent in your HTTP request are not valid and this is why you have encountered this error. The prevention tip recommended is to make sure you've passed the correct access token associated with your account. It's sometimes confused with refresh tokens and authorization codes. If you would like to get a credential that can access all client accounts under a manager account, make sure you get the refresh token for the manager account. For more details, see our guide on access token and refresh token and OAuth2.

If the issue still persists, please provide us with the complete API logs (request and response with request-id and request header) generated at your end to better assist you.

As you are using the python client library, if you haven't enabled the logging yet, I would request you to enable logging at your end by referring to the guide on Python.

You can send the details via Reply privately to the author option, or direct private reply to this email.

 
This message is in relation to case "ref:!00D1U01174p.!5004Q02q9j8u:ref"

Thanks,
 
Google Logo Google Ads API Team


Reply all
Reply to author
Forward
0 new messages