Where can I find the API Center page of a test account

2023-10-11 Thread Wayne L
Hi,
new to google ads and I tried to understand google ads api, I watch these 
<http://youtube.com/watch?v=xm5-iDOhF_8&list=PLKByxjzUC-N_Uep8VTb5Z3EAguG_hu8dI&index=2>
 video 
made by official google ads developer channel. I followed those step and 
create a test manager and client account, when I tried to filled that .yaml 
file up I find out that I can't fetch developer token of my test account 
because the API Center page is not shown at the setting page.
Am I do anything wrong or I just can't use a test account for testing?

Thanks,
Wayne.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/ceaeea62-c276-4e5e-ae48-35be140b7d3en%40googlegroups.com.


Re: How to get the Entire Campaign object when creating the campaign

2022-01-12 Thread Wayne
Amazing! That helped. Thanks a lot! :)

On Wednesday, January 12, 2022 at 11:05:35 PM UTC+5:30 adsapi wrote:

> Hi Wayne,
>
> You can make a MutateCampaignsRequest 
> <https://developers.google.com/google-ads/api/reference/rpc/v9/MutateCampaignsRequest>
>  and 
> set the response_content_type field to MUTABLE_RESOURCE. This determines 
> whether the mutable resource or just the resource name should be returned 
> post mutation. Please see this example 
> <https://github.com/googleads/google-ads-java/blob/da4278829719caafb27258f29c02810fb0cb8d87/google-ads-examples/src/main/java/com/google/ads/googleads/examples/campaignmanagement/AddCampaignBidModifier.java#L129>
>  
> of its usage.
>
> Alternatively, if you have the resource name just need the campaign ID, 
> you can simply strip that last parameter from the resource name, 
> customers/{customer_id}/campaigns/{campaign_id}. 
>
>
> Regards,
> Matt
> Google Ads API Team
>
> [image: Google Logo] 
> Matt 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q2UinQf:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/162465cc-c113-485b-b6ac-62596b4aa7abn%40googlegroups.com.


Re: How to get the Entire Campaign object when creating the campaign

2022-01-11 Thread Wayne
Thanks Matt for the quick response there!

I had a doubt, wouldn't GET request be a not-so-good idea, since there is a 
limit on GET requests(1000/day)? Further we don't want to make any external 
Google API call.
All we need is the campaign ID from the resource name! Is there a function 
for that without making a GET / Search request ? This would be quite 
helpful since we can't change the Database schema at our end. All primary 
keys are campaign ID, adgroup ID and so on... We can't change it to 
campaign resource name or adgroup resource name. Please help us in figuring 
out how to extract the campaign ID from the resource name WITHOUT making an 
API call to Google!

Help would be appreciated. Thanks!

On Tuesday, January 11, 2022 at 8:34:17 PM UTC+5:30 adsapi wrote:

> Hi Wayne,
>
> Thanks for reaching out. To fetch the entire campaign object with all of 
> its attributes, you must issue a GET request.
>
> You can create a campaign object, referencing an existing campaign with: 
>
>   Campaign campaign =
>   Campaign.newBuilder()
>   .setResourceName(ResourceNames.campaign(customerId, 
> campaignId))
>
> Regards,
> Matt
> Google Ads API Team
>
> [image: Google Logo] 
> Matt 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q2UinQf:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/76235291-6841-4def-85c3-4f864c227660n%40googlegroups.com.


How to get the Entire Campaign object when creating the campaign

2022-01-11 Thread Wayne
Hi!
Hope you're doing well.

I have a question.
When I am creating campaign like this

MutateCampaignsResponse response = campaignServiceClient.mutateCampaigns( 
customerId, operations);
for (MutateCampaignResult result : response.getResultsList()) {
String createdCampaign = result.getResourceName();
}

Since "result" only contains the resource name, I am only able to get the 
resource name of the newly created campaign! Is there any way to fetch the 
entire Campaign object which was created on Google? (Without any GET call/ 
query)

Thanks.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/d4e54c58-53c9-44ce-a533-9bf443b9319an%40googlegroups.com.


Need help with class names for migration

2021-12-16 Thread Wayne
Hi team,
We're migrating our Adwords API to Google Ads API.
We need some help with the following class names -
Placement, Vertical, BiddableAdGroupCriterion, AdGroupBidModifier.

I also have a few other queries which I will share by privately replying to 
the author.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"AdWords API and Google Ads 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/ff8eeed7-644e-40e6-837b-5bec5db6edean%40googlegroups.com.


CriterionError.KEYWORD_HAS_TOO_MANY_WORDS

2021-11-16 Thread Wayne
Hi,
We are getting the error "CriterionError.KEYWORD_HAS_TOO_MANY_WORDS" when 
using Google Adwords API. It'd be great if you can provide us the maximum 
number of words allowed in a keyword.
Thanks!

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"AdWords API and Google Ads 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/3668bac7-7652-4e5f-aa05-4be6110536b0n%40googlegroups.com.


Error - null sun.reflect.NativeConstructorAccessorImpl.newInstance

2021-11-08 Thread Wayne
Hi team,
we are getting this error when trying to Pause Ad using Google Adwords API:


*null sun.reflect.NativeConstructorAccessorImpl.newInstance*
also this error: *null 
sun.reflect.GeneratedConstructorAccessor242.newInstance(Unknown Source)*

I'm sharing the entire stack trace privately. Please help us in 
understanding more about this error and how to avoid.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"AdWords API and Google Ads 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/08ed5001-c926-4d2e-9f6c-209836ab8911n%40googlegroups.com.


Re: Query for getting all campaign with the given name - Google Ads

2021-11-02 Thread Wayne
Thanks a lot Peter! That helped! :)
However, will it be possible to return an entire campaign? I mean here in 
the query we have to SELECT the fields we want, is it possible to return 
the whole campaign? Using query? Or a GET call? I just have the campaign 
name. So how to get the whole campaign?
Thanks!

On Wednesday, November 3, 2021 at 11:50:42 AM UTC+5:30 adsapi wrote:

> Hi Wayne,
>
> You can use our Query builder 
> <https://developers.google.com/google-ads/api/fields/v8/overview_query_builder?hl=en>
>  
> and Query validator 
> <https://developers.google.com/google-ads/api/fields/v8/query_validator?hl=en>
>  
> prior to using your GAQL in your API requests. As for filtering campaign 
> names, you can use operators such as LIKE as seen in the query below :
>
> *SELECT campaign_budget.id <http://campaign_budget.id>, 
> campaign_budget.name <http://campaign_budget.name>, 
> campaign_budget.resource_name, campaign.name <http://campaign.name> FROM 
> campaign_budget WHERE campaign.name <http://campaign.name> LIKE 
> 'Campaign_Name'*
>
> Let me know how this goes on your end.
>
> Best regards,
>
> [image: Google Logo] 
> Peter Laurence Napa Oliquino 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q2QHEw3:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"AdWords API and Google Ads 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/58c5f2c8-9ae2-4554-b6bb-e7136cf5n%40googlegroups.com.


Query for getting all campaign with the given name - Google Ads

2021-11-02 Thread Wayne
Hi team
I'm trying to fetch all the campaigns with a given name using the below 
query:

SearchGoogleAdsRequest request =
SearchGoogleAdsRequest.newBuilder()
.setCustomerId(Long.toString(customerId))
.setPageSize(1_000)
.setQuery(
String.format(
"SELECT campaign_budget.id, campaign_budget.name, "
+ "campaign_budget.resource_name FROM campaign_budget "
+ "WHERE campaign.name = '%s'",
campaignName))
.build();

// Retrieves the budget.
GoogleAdsServiceClient googleAdsServiceClient =
googleAdsClient.getLatestVersion().createGoogleAdsServiceClient();
GoogleAdsServiceClient.SearchPagedResponse searchPagedResponse = 
googleAdsServiceClient.search(request);
System.out
.println(searchPagedResponse.getPage().getResponse().getResults(0).getCampaignBudget());


However, I'm getting the below error:

Headers: Metadata(content-type=application/grpc,request-id=**,date=Tue, 
02 Nov 2021 12:13:04 GMT,alt-svc=h3=":443"; ma=2592000,h3-29=":443"; 
ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; 
ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43")
Body: null
Failure message: errors {
  error_code {
query_error: EXPECTED_REFERENCED_FIELD_IN_SELECT_CLAUSE
  }
  message: "The following field must be present in SELECT clause: 
\'campaign.name\'."
}
request_id: "***"

Status: Status{code=INVALID_ARGUMENT, description=Request contains an 
invalid argument., cause=null}.

I'm using GoogleAds API.
Kindly tell if it is possible to get a campaign with a particular name. 
(NOT resource name - just the campaign name).

Thanks!


-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"AdWords API and Google Ads 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/71762768-5745-4bd7-a104-1792dee14c35n%40googlegroups.com.


Re: DEVELOPER_TOKEN_NOT_APPROVED - Google Ads

2021-10-06 Thread Wayne
Hi Mark
Thanks for the reply. Can you please review our account if we provide our 
account ID?
Thanks!

On Thursday, October 7, 2021 at 11:33:55 AM UTC+5:30 adsapi wrote:

> Hello,
>
> Thank you for reaching out to us.
>
> You've mentioned that you're using Google Ads TEST account for making API 
> calls. If you're initiating the request on an actual production account, 
> then this is the reason why you've encountered the 
> DEVELOPER_TOKEN_NOT_APPROVED 
> 
>  error. 
> If you wish to use the developer token and make API requests on production 
> accounts, you should apply for either Basic or Standard API access. You can 
> check on the procedures mentioned on this guide 
> 
>  for 
> more details.
>
> As an aside, I will be removing your original post as it contains a 
> screenshot of your response log. Moving forward, please refrain from 
> sharing logs in the Forum thread. Below is a copy of your post.
>
>
>
>
>
>
>
>
> *Hi team, We are using a Google Ads TEST account for making API calls. 
> When sending API request to create shared campaigns as shown in the 
> official docs of Google Ads API 
> (https://developers.google.com/google-ads/api/rest/examples#creates 
> ) we 
> get the following error: The developer token is not approved. Non-approved 
> developer tokens can only be used with test accounts. We are using Test 
> account ID for making call. We even tried resetting the dev token, but we 
> are still getting the same error. Please help with this issues! Thanks.*
>
> Regards,
> [image: Google Logo] 
> Mark Kevin Albios 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q2PHGmC:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"AdWords API and Google Ads 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/4684f065-25cf-40a0-9208-844be1549c98n%40googlegroups.com.


Re: curl for location targeting

2021-08-16 Thread Wayne
Hi, thanks for the reply.
I have a question, when sending locations in batch through Google Ads API (
https://developers.google.com/google-ads/api/docs/targeting/location-targeting#look_up_by_location_name
)
We can send only 25 locations at once, however for every location, only 10 
results are returned. Is there any way possible to get ALL possible results 
for that location name, instead of just 10?
And is there any filter we can provide when calling the API that we only 
want Target_Type==City results?
Thanks!

On Monday, August 16, 2021 at 10:05:46 AM UTC+5:30 adsapi wrote:

> Hi Wayne,
>
> Thanks for getting back to us.
>
> You may use the Geo_target_constant 
> <https://developers.google.com/google-ads/api/fields/v8/geo_target_constant> 
> report in Google Ads API to download the geo targets. Then, you’ll need to 
> create a post process that will transfer the API response in a CSV file. 
> Kindly note that there is an existing feature request to download the 
> report in the CSV file. With this, I would suggest keeping an eye on this 
> blog <https://ads-developers.googleblog.com/> as we will post any 
> relevant updates when they become supported.
>
> Let us know if you have any further questions.
>
> Regards, 
> [image: Google Logo] 
> Yasar 
> Google Ads API Team 
>   
>
>  
>
> ref:_00D1U1174p._5004Q2LmeK9:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"AdWords API and Google Ads 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/d07d2e38-e06b-48f7-88b6-3211023e62ffn%40googlegroups.com.


Re: curl for location targeting

2021-08-16 Thread Wayne
Hi, thanks for the reply.
I have a question, when sending locations in batch through Google Ads API 
(https://developers.google.com/google-ads/api/docs/targeting/location-targeting#look_up_by_location_name)
We can send only 25 locations at once, however for every location, only 10 
results are returned. Is there any way possible to get ALL possible results 
for that location name, instead of just 10?
Thanks!

On Monday, August 16, 2021 at 10:05:46 AM UTC+5:30 adsapi wrote:

> Hi Wayne,
>
> Thanks for getting back to us.
>
> You may use the Geo_target_constant 
> <https://developers.google.com/google-ads/api/fields/v8/geo_target_constant> 
> report in Google Ads API to download the geo targets. Then, you’ll need to 
> create a post process that will transfer the API response in a CSV file. 
> Kindly note that there is an existing feature request to download the 
> report in the CSV file. With this, I would suggest keeping an eye on this 
> blog <https://ads-developers.googleblog.com/> as we will post any 
> relevant updates when they become supported.
>
> Let us know if you have any further questions.
>
> Regards, 
> [image: Google Logo] 
> Yasar 
> Google Ads API Team 
>   
>
>  
>
> ref:_00D1U1174p._5004Q2LmeK9:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"AdWords API and Google Ads 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/3195f26e-bb66-4b3a-ba44-2d338971af5dn%40googlegroups.com.


Re: curl for location targeting

2021-08-12 Thread Wayne
Thanks!
Can we download the complete CSV through API? (this CSV 
here https://developers.google.com/adwords/api/docs/appendix/geotargeting)

On Friday, August 13, 2021 at 11:02:12 AM UTC+5:30 adsapi wrote:

> Hi Wayne,
>
> You may check out this guide 
> <https://developers.google.com/google-ads/api/rest/overview?hl=en> for 
> constructing requests without using a client library. For looking up 
> locations by location name, you can then refer to this guide 
> <https://developers.google.com/google-ads/api/rest/reference/rest/v8/geoTargetConstants/suggest>.
>  
> Let me know if this is what you're looking for.
>
> Best regards,
>
> [image: Google Logo] 
> Peter Laurence Napa Oliquino 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q2LmeK9:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"AdWords API and Google Ads 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/ecd66bf3-d1a0-474d-a9c7-242777df64aan%40googlegroups.com.


curl for location targeting

2021-08-12 Thread Wayne
Hi all
I want a curl for location targeting(google-ads API).
https://developers.google.com/google-ads/api/docs/targeting/location-targeting#look_up_by_location_name
i want the criterion ID for location name.
In the above link, code is given, a curl for the same would be helpful.
Thanks.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"AdWords API and Google Ads 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/3eadf0ea-35da-4175-b3e0-0b870a654a50n%40googlegroups.com.


Re:Oauth2 token expired time issue by Wayne tao

2020-09-11 Thread Wayne Tao
Hi,
Sorry for that I am facing issues replying privately, I provide
the original email content and the information you need as below:
---


Wayne Tao
Sep 10, 2020, 1:34:37 PM (yesterday)



to adwor...@googlegroups.com
Hi Team,

I have an issue about refresh user token expired time, I realize that user
token can only use for one hour then it will expired, so I write a function
to auto refresh token when it going to expired.

*Here's the code:*
GoogleOAuth auth = dao.getGoogleAuth();
System.out.println(String.format("Auth expired date:%s",
  new Date(auth.getExpirationTimeMillis()).toString()));
//get the original UserCredentials
UserCredentials credentials = auth.toUserCredentials();
credentials.refresh();
AccessToken accessToken = credentials.refreshAccessToken();

System.out.println("current time:" + new Date().toString());
System.out.println(String.format("Auth new expired date:%s",
  accessToken.getExpirationTime().toString()));
GoogleOAuth newAuth = GoogleOAuth.newBuilder(credentials.getClientId())

.setClientSecret(config.getClientSecret()).setRefreshToken(accessToken.getTokenValue())
  .setAccessToken(credentials.getAccessToken().getTokenValue())

.setExpirationTimeMillis(accessToken.getExpirationTime().getTime()).build();
biz.getMutator().mutateConnectGoogle(newAuth);
Collection accountIds = newAuth.getAllAdAccounts(true);
GoogleCache.refreshAccountAndCampaignCache(newAuth, credentials,
accessToken, accountIds);

*The output got from Google:*
Auth expired date:Thu Sep 10 13:35:09 CST 2020
current time:Thu Sep 10 12:41:48 CST 2020
Auth new expired date:Thu Sep 10 13:35:10 CST 2020

I got the new token after run the auto refresh function, but the expired
time was not changed, I am not sure whats problem about it.




[image: adsapiforumadvisor's profile photo]
adsapiforumadvisor
Sep 10, 2020, 11:37:17 PM (yesterday)



to Wayne Tao, adwor...@googlegroups.com
Hi Wayne,

Thank you for reaching out. I see that you're encountering a continuously
invalidating refresh token. Could you check that you haven't hit these
limits <https://developers.google.com/identity/protocols/oauth2#expiration> for
refresh tokens? If not, could you provide us with the request and response
logs for where you encounter this issue? For privacy you can provide this
to us by clicking "reply privately to author".

Thank you,
---

we never reach the refresh tokens before, so I provide the request and
response logs to you:

Request:
client_id:
125997677546-l16cgrq8q5a6h9s6v45har09mqvi4fmk.apps.googleusercontent.com
client_secret:_fsiHdYW4Bocv85TNegesZMn
refresh_token:ya29.a0AfH6SMBUp6xG3XPOa9Pi0enziyIPvYc5n_lVw2bckuyJhJfGmeKRthygQ1dOxtZWZH7je3SAwRkYDQ2jjlGr79vgIIBClrvkmodl7DpGFrhpidFLrkVue-0X-XcByBVAE-GSDUQ5xWO5Htvf8BEuoK_VggjSpcSiXEA
grant_type:refresh_token
accessToken:AccessToken{tokenValue=ya29.a0AfH6SMCP1kKi0rQOx8wSnuwWfEtTCiJXfdKNPpKH30i16L7ODViJHbnvprgXT98WwvVjVPKbMC78znjIP1M7QtHbXyxCL4Puj7RpU9DMy3AkGpd5Iw21NDkxecP5DwVkvmLGm_POE06_sEiysUDTT-VuDoGmEkCgpkU,
expirationTimeMillis=1599805492696}
transportFactory:com.atfone.ads.wrapper.GoogleOAuth$DefaultHttpTransportFactory
tokenServerUri:https://oauth2.googleapis.com/token


Response:
GenericData{classInfo=[],
{access_token=ya29.a0AfH6SMCJdKXj_-Q9GUREE9_tTzwdpq827lC7w3i9yxdfinGUil9vb3_EMycjHXVEVsKFWJyN4DSSk1aqmFzrGNzB9gAoLqmSVuepoMbp0-O4bfMaRhs7ZmervOE1VPiN4ypNLcS1EFUnqC-ZNwad0yhUJsLawjPhqGo,
expires_in=1843, scope=https://www.googleapis.com/auth/userinfo.profile
openid https://www.googleapis.com/auth/userinfo.email
https://www.googleapis.com/auth/adwords, token_type=Bearer,
id_token=eyJhbGciOiJSUzI1NiIsImtpZCI6IjNmMzMyYjNlOWI5MjhiZmU1MWJjZjRmOGRhNTQzY2M0YmQ5ZDQ3MjQiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL2FjY291bnRzLmdvb2dsZS5jb20iLCJhenAiOiIxMjU5OTc2Nzc1NDYtbDE2Y2dycThxNWE2aDlzNnY0NWhhcjA5bXF2aTRmbWsuYXBwcy5nb29nbGV1c2VyY29udGVudC5jb20iLCJhdWQiOiIxMjU5OTc2Nzc1NDYtbDE2Y2dycThxNWE2aDlzNnY0NWhhcjA5bXF2aTRmbWsuYXBwcy5nb29nbGV1c2VyY29udGVudC5jb20iLCJzdWIiOiIxMTEyMjE5NDIwMjg4MDM5NTg1NTQiLCJlbWFpbCI6ImFhYTgxNzI3QGdtYWlsLmNvbSIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJhdF9oYXNoIjoicGxvdzQtNUZiVUktNXIxb1pEbHNPQSIsIm5hbWUiOiLnvqPlhqDliokiLCJwaWN0dXJlIjoiaHR0cHM6Ly9saDUuZ29vZ2xldXNlcmNvbnRlbnQuY29tLy1uMk1tdDl5YnlqRS9BQUFBQUFBQUFBSS9BQUFBQUFBQUFBQS9BTVp1dWNrTzdnSUkwQkZXNGdKZV96QWV4d3R5QVdlT3lnL3M5Ni1jL3Bob3RvLmpwZyIsImdpdmVuX25hbWUiOiLliokiLCJmYW1pbHlfbmFtZSI6Iue-o-WGoCIsImxvY2FsZSI6InpoLVRXIiwiaWF0IjoxNTk5ODAzNjQ5LCJleHAiOjE1OTk4MDcyNDl9.UAqF2cuUzXVh8-Pmd_Rt4ObYF5w72sgagorM6PJi-DKIqjJOBdj_EPDTPuZNAD-1NpUlwo4RR2MN3Kk-kL78ctCOPKkWn52pQvjh3Y37d2fy66M9IYDwWrQl4lwSZ8HIqszAxn0tzpKBRRKrecz8OQIJAMaLTrFKKUd7R6uf2ozFaCuC4zTKzu-5WBrnakdy71gv0KGq_D10_s91zVeB-jIZZCBl_-3DIk8-9I9iumV_sz1BO-YZvfIObDrE5ZHkR0qB8i8_uXPvPZkg9zSLk3Jc4dHFJmkKoqqS3U4Gfhm2j75JXuEg73VcGFlcG2c-lb19OZYDeDNmMj5DGYfA_Q}}

-- 
-- 
=~=~=~=~=~=~=~

Re: Oauth2 token expired time

2020-09-11 Thread Wayne Tao
Hi, 
I am facing issues replying privately, so I just sent the information you 
need to "googleadsapi-supp...@google.com" & "adwords-api@googlegroups.com", 
the topic is "Re:Oauth2 token expired time issue by Wayne tao"


On Thursday, September 10, 2020 at 11:37:17 PM UTC+8 adsapiforumadvisor 
wrote:

> Hi Wayne,
>
> Thank you for reaching out. I see that you're encountering a continuously 
> invalidating refresh token. Could you check that you haven't hit these 
> limits 
> <https://developers.google.com/identity/protocols/oauth2#expiration> for 
> refresh tokens? If not, could you provide us with the request and response 
> logs for where you encounter this issue? For privacy you can provide this 
> to us by clicking "reply privately to author".
>
> Thank you,
>
> [image: Google Logo] 
> Bryan Li 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q24aEO9:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"AdWords API and Google Ads 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/d78437d9-0088-43cf-acf9-16a8806caccdn%40googlegroups.com.


Oauth2 token expired time

2020-09-09 Thread Wayne Tao
Hi Team,

I have an issue about refresh user token expired time, I realize that user 
token can only use for one hour then it will expired, so I write a function 
to auto refresh token when it going to expired.

*Here's the code:*
GoogleOAuth auth = dao.getGoogleAuth();
System.out.println(String.format("Auth expired date:%s",
  new Date(auth.getExpirationTimeMillis()).toString()));
//get the original UserCredentials
UserCredentials credentials = auth.toUserCredentials();
credentials.refresh();
AccessToken accessToken = credentials.refreshAccessToken();

System.out.println("current time:" + new Date().toString());
System.out.println(String.format("Auth new expired date:%s",
  accessToken.getExpirationTime().toString()));
GoogleOAuth newAuth = GoogleOAuth.newBuilder(credentials.getClientId())
  
.setClientSecret(config.getClientSecret()).setRefreshToken(accessToken.getTokenValue())
  .setAccessToken(credentials.getAccessToken().getTokenValue())
  
.setExpirationTimeMillis(accessToken.getExpirationTime().getTime()).build();
biz.getMutator().mutateConnectGoogle(newAuth);
Collection accountIds = newAuth.getAllAdAccounts(true);
GoogleCache.refreshAccountAndCampaignCache(newAuth, credentials, 
accessToken, accountIds);

*The output got from Google:*
Auth expired date:Thu Sep 10 13:35:09 CST 2020
current time:Thu Sep 10 12:41:48 CST 2020
Auth new expired date:Thu Sep 10 13:35:10 CST 2020

I got the new token after run the auto refresh function, but the expired 
time was not changed, I am not sure whats problem about 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 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 
"AdWords API and Google Ads 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/746e71c6-4de1-4506-bfaf-6b65d38d9782n%40googlegroups.com.