Hi Filip, 

To make any calls to the AdWords API, you will need the OAuth credentials 
(client Id and client secret) and OAuth tokens (refresh token/access 
token). From your note, it looks like you have already done this step and 
ready to make the API call. Are you trying to make calls against the 
client's AdWords account? If so, please note that the clients will need to 
authorize your call (manually accept the prompt and share the authorization 
code with you) while generating the refresh token. More details about OAth 
setup can be found here 
<https://developers.google.com/adwords/api/docs/guides/first-api-call#set_up_oauth2_authentication>.
 
The guide on make your first API call 
<https://developers.google.com/adwords/api/docs/guides/first-api-call> should 
be helpful for you. 

To add the Ip block, you will need to use the CampaignCriterionService 
<https://developers.google.com/adwords/api/docs/reference/v201710/CampaignCriterionService>
 and 
add the IpBlock 
<https://developers.google.com/adwords/api/docs/reference/v201710/CampaignCriterionService.IpBlock>
 as 
a negative criterion. We don't have a sample for this scenario but you 
could check AddCampaignTargetingCriteria 
<https://github.com/googleads/googleads-java-lib/blob/master/examples/adwords_axis/src/main/java/adwords/axis/v201710/targeting/AddCampaignTargetingCriteria.java#L208-L218>
 sample 
in Java which shows how a keyword can be added as negative campaign 
criterion. You will need to modify the code to add the IpBlock instead. 
Samples in other languages can also be found here 
<https://developers.google.com/adwords/api/docs/clientlibraries>. Let me 
know if you have any additional questions. 

Thanks,
Sreelakshmi, AdWords API Team

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords 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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/eaade6a5-b32a-4ec0-b6c0-6402d3229fb8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • Adding a... Filip J
    • Re:... 'Sreelakshmi Sasidharan (AdWords API Team)' via AdWords API Forum

Reply via email to