Thank you for your reply. We have found the cause of the problem. A colleague reset the developer token, causing the original token to become invalid. After replacing it with the new developer token interface, the interface runs normally.
On Thursday 21 December 2023 at 01:14:37 UTC+8 Google Ads API Forum Advisor wrote: Hi, Thank you for reaching out to the Google Ads API support team. After reviewing your query, I understand that you are getting the error " OAUTH_TOKEN_HEADER_INVALID <https://developers.google.com/google-ads/api/reference/rpc/v15/AuthenticationErrorEnum.AuthenticationError#oauth_token_header_invalid>" in the production environment. 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 <https://developers.google.com/google-ads/api/docs/first-call/refresh-token> for the manager account. For more details, see our guide on access token and refresh token <https://developers.google.com/google-ads/api/docs/oauth/internals#access_and_refresh_token> and OAuth2 <https://developers.google.com/google-ads/api/docs/oauth/overview>. If the issue still persists, please provide us with the complete API logs ( request <https://developers.google.com/google-ads/api/docs/concepts/field-service#request> and response <https://developers.google.com/google-ads/api/docs/concepts/field-service#response> with request-id <https://developers.google.com/google-ads/api/docs/concepts/call-structure#request-id> and request header <https://developers.google.com/google-ads/api/docs/concepts/call-structure#request_headers>) generated at your end to better assist you. If you are using a client library and haven't enabled the logging yet, I would request you to enable logging for the specific client library that you are using. You can refer to the guides <https://developers.google.com/google-ads/api/docs/client-libs/java/logging> *Java* <https://developers.google.com/google-ads/api/docs/client-libs/java/logging> , <https://developers.google.com/google-ads/api/docs/client-libs/dotnet/logging> *.Net* <https://developers.google.com/google-ads/api/docs/client-libs/dotnet/logging> , <https://developers.google.com/google-ads/api/docs/client-libs/php/logging> *PHP* <https://developers.google.com/google-ads/api/docs/client-libs/php/logging>, <https://developers.google.com/google-ads/api/docs/client-libs/python/logging> *Python* <https://developers.google.com/google-ads/api/docs/client-libs/python/logging> , <https://developers.google.com/google-ads/api/docs/client-libs/ruby/logging> *Ruby* <https://developers.google.com/google-ads/api/docs/client-libs/ruby/logging> or <https://developers.google.com/google-ads/api/docs/client-libs/perl/logging> *Perl* <https://developers.google.com/google-ads/api/docs/client-libs/perl/logging> to enable logging at your end. For REST interface requests, you can enable logging via the curl command by using the -i flag. 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.!5004Q02r2twx:ref" Thanks, [image: Google Logo] Google Ads API Team -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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/b78ddca5-cefc-43a5-b5d5-de388e4336dcn%40googlegroups.com.