‫أُرسلت من الـ iPhone‬

> ‫في ٠٩‏/٠٩‏/٢٠٢٠ الساعة ٢:٠٦ ص، كتب/كتبت ‏Chris London ‏<[email protected]>:‬
> 
> I've set up OAuth2 and I'm able to get credentials to access the API but 
> there seems to be a gap in the documentation on retrieving the 
> `client_customer_id`.
> 
> I was following this documentation: 
> https://github.com/googleads/googleads-python-lib/wiki/API-access-on-behalf-of-your-clients-(web-flow)
> 
> I know that I can manually log into my AdWords account and find my ID on the 
> top but that's cumbersome for users. I was hoping when the user accepts to 
> give me access to their  AdWords there would be a way to programmatically get 
> the client_customer_id.
> 
> Here's an example of my code:
> 
> ```
> oauth2_client = oauth2.GoogleRefreshTokenClient(
>     os.environ.get("ADWORDS_CLIENT_ID"),
>     os.environ.get("ADWORDS_CLIENT_SECRET"),
>     account.refresh_token,  # Refresh token from OAuth2
> )
> 
> # Initialize the AdWords client.
> adwords_client = adwords.AdWordsClient(
>     os.environ.get("ADWORDS_DEVELOPER_TOKEN"), 
>     oauth2_client,
>     os.environ.get("ADWORDS_USER_AGENT"), 
>     # We don't know the client_customer_id yet
> )
> 
> customer_service = adwords_client.GetService(
>     "CustomerService", version="v201809"
> )
> customers = customer_service.getCustomers()
> ```
> 
> When I do that I get this error:
> googleads.errors.GoogleAdsServerFault: 
> [AuthenticationError.CUSTOMER_NOT_FOUND @ ]
> 
> Is there a way to programmatically retrieve the client_customer_id without 
> having to ask the customer to manually enter it?
> -- 
> -- 
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
> 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/7a730841-5539-433f-b867-c3ef00cd6ef3n%40googlegroups.com.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/20EC16FF-7F0F-4EE5-BA92-A52B3DC5F71B%40gmail.com.

Reply via email to