As Setting up the client library 
<https://github.com/googleads/google-ads-python/wiki/OAuth-Web-Application-Flow>
 suggested. 
I use codes below to initialize a client object and then do some service.


I've got  the refresh_token followed starting steps.

import google.ads.google_ads.client
import google.oauth2.credentials


# Initialize Credentials using the credentials you received
# in the earlier steps.
credentials = google.oauth2.credentials.Credentials(
             None,
             refresh_token=refresh_token,
             client_id=client_id,
             client_secret=client_secret,
             token_uri='https://accounts.google.com/o/oauth2/token')

# Initialize the GoogleAdsClient.
client = google.ads.google_ads.client.GoogleAdsClient(
    credentials, developer_token)




But I always got error like :


(<_Rendezvous 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":"@1566x68633.012x11175","description":"Error received from peer 
ipv4:xxx.58.2x0.42:443","file":"src/core/lib/surface/call.cc","file_line":1052,"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}";
>, <_Rendezvous 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":"@1x68633.01x1175","description":"Error received from peer 
ipv4:216.x8.20x.42:443","file":"src/core/lib/surface/call.cc","file_line":1052,"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."
}
, 'OpFCsUhrNjDtgSRAT-N2YA')


What's the problem, and what should I do to make it work as expected..


-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"AdWords API and Google Ads 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/ac25052c-b99c-40a6-ba3d-350fc659ede5%40googlegroups.com.

Reply via email to