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 [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 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/4deaaed1-b9dc-4f8b-b0a4-2f9207e5cf21n%40googlegroups.com.
  • Re... [email protected]
    • ... Walter Bodwell
      • ... Walter Bodwell
    • ... Tamas Tyukodi
      • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
        • ... Tamas Tyukodi
          • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum

Reply via email to