AdWords API flex: use webService to get the adwords api
can flex to call the adwords api? i use it below, but it doesn't work. Can someone help me? tks the code: mx:WebService id=Service wsdl=https://adwords.google.com/api/adwords/v12/ KeywordToolService?wsdl useProxy=false load=setupHeaders() mx:operation name=getKeywordVariations resultFormat=object result=getTrans_result(event); fault=getTrans_fault(event); mx:request getKeywordVariations seedKeywords negativefalse/negative textmars cruise/text typeBroad/type /seedKeywords useSynonymstrue/useSynonyms languagesen/languages countriesUS/countries /getKeywordVariations /mx:request /mx:operation /mx:WebService public class Info{ //该类名称可以和.Net中的ValidateSoapHeader不同 //但字段要对应拼写相同 public var email:String; public var password:String; public var clientEmail:String; public var useragent:String; public var developerToken:String; public var applicationToken:String; } private function sendRequest():void{ var content:Info = new Info(); content.email = XX; content.password = XX; content.clientEmail = XX; content.useragent = mogoo inc.: AdWords API Java Sample Code; content.developerToken = XX; content.applicationToken = XX; var qname:QName = new QName(http://www.w3.org/2001/ XMLSchema,KeywordToolService); var header:SOAPHeader = new SOAPHeader(qname,content); Service.clearHeaders(); Service.addHeader(header); Service.getKeywordVariations(); } mx:Button label=发送 click=sendRequest() fontSize=12/ tks what's wrong with it? Seam --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
AdWords API Flex and Google Adwords API
Has anyone played with the google adwords api in flex? I can't find any examples online and I am yet to actually make a successfull call to it. I think the trouble I'm having is because it needs headers in the soap call. I've tried using the addSimpleHeader method but no luck. Here is the wsdl : https://adwords.google.cn/api/adwords/v12/KeywordToolService?wsdl I'm just trying to make a successfull call to the getKeywordVariations method. Please help. If you have any example code that would be great. Thanks Mike --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
AdWords API Re: just want to debug the demo of get_keyword_variations.php
hello,thank you for your help. i use the information below (contains the token ,email and password) require_once('soapclientfactory.php'); # Provide AdWords login information. $email = 'e...@beejaa.com'; $password = 'beejaa2009'; $client_email = 'eliu20050...@gmail.com'; $useragent = 'Eugene Liu'; $developer_token = 'DFPSUlKQru4mqnf47O5mzg'; $application_token = '049yv2u8TCKja2A3tv4wLQ'; # Define SOAP headers. $headers = 'email' . $email . '/email'. 'password' . $password . '/password' . 'clientEmail' . $client_email . '/clientEmail' . 'useragent' . $useragent . '/useragent' . 'developerToken' . $developer_token . '/developerToken' . 'applicationToken' . $application_token . '/applicationToken'; # Set up service connection. To view XML request/response, change value of # $debug to 1. To send requests to production environment, replace # sandbox.google.com with adwords.google.com. $namespace = 'https://adwords.google.com/api/adwords/v12'; $keyword_tool_service = SoapClientFactory::GetClient( $namespace . '/KeywordToolService?wsdl', 'wsdl'); $keyword_tool_service-setHeaders($headers); $debug = 1; # Create seed keyword structure. $seed_keyword = 'negativefalse/negative' . 'textmars cruise/text' . 'typeBroad/type'; $use_synonyms = 'useSynonymstrue/useSynonyms'; # Get keyword variations. $request_xml = 'getKeywordVariations' . 'seedKeywords' . $seed_keyword . '/seedKeywords' . $use_synonyms . 'languagesen/languages' . 'countriesUS/countries' . '/getKeywordVariations'; $variation_lists = $keyword_tool_service-call('getKeywordVariations', $request_xml); $variation_lists = $variation_lists['getKeywordVariationsReturn']; if ($debug) show_xml($keyword_tool_service); if ($keyword_tool_service-fault) show_fault($keyword_tool_service); # Display keyword variations. $to_consider = $variation_lists['additionalToConsider']; echo 'List of additional keywords to consider has ' . count ($to_consider) . ' variation(s).' . \n; $more_specific = $variation_lists['moreSpecific']; echo 'List of popular queries with given seed has ' . count ($more_specific) . ' variation(s).' . \n; ? it returns List of additional keywords to consider has 0 variation (s). List of popular queries with given seed has 0 variation(s)., it shows maybe the method of getKeywordVariations not work rightly. what's wrong with it? tks Seam On 2月18日, 下午11时55分, AdWords API Advisor adwordsapiadvi...@google.com wrote: Hello, Why are you setting the namespace to 'https://adwords.google.cn/api/ adwords/v12'? Please use 'adwords.google.com' as the server portion of the URL, not adwords.google.cn. If that doesn't resolve the issue for you, please provide a log of the SOAP request and response (with your token and password information X-ed out). Cheers, -Jeff Posnick, AdWords API Team On Feb 17, 10:44 pm, ainihong001 ainihong...@126.com wrote: hi,i want to use some Adwords api. and i have got developer_token and application_token, i use the demo of get_keyword_variations.php . But it returns List of additional keywords to consider has 0 variation (s). List of popular queries with given seed has 0 variation(s)., it shows maybe the method of getKeywordVariations not work rightly. i don't want to use APIlity,just to debug this.tks. The code of get_keyword_variations.php is below and i have replace the email and others using myown information and i can provide the right information about the email and password if necessary. # Provide AdWords login information. $email = 'INSERT_LOGIN_EMAIL_HERE'; $password = 'INSERT_PASSWORD_HERE'; $client_email = 'INSERT_CLIENT_LOGIN_EMAIL_HERE'; $useragent = 'INSERT_COMPANY_NAME: AdWords API PHP Sample Code'; $developer_token = 'INSERT_DEVELOPER_TOKEN_HERE'; $application_token = 'INSERT_APPLICATION_TOKEN_HERE'; # Define SOAP headers. $headers = 'email' . $email . '/email'. 'password' . $password . '/password' . 'clientEmail' . $client_email . '/clientEmail' . 'useragent' . $useragent . '/useragent' . 'developerToken' . $developer_token . '/developerToken' . 'applicationToken' . $application_token . '/applicationToken'; # Set up service connection. To view XML request/response, change value of # $debug to 1. To send requests to production environment, replace # sandbox.google.com with adwords.google.com. $namespace = 'https://adwords.google.cn/api/adwords/v12'; $keyword_tool_service = SoapClientFactory::GetClient( $namespace . '/KeywordToolService?wsdl', 'wsdl'); $keyword_tool_service-setHeaders($headers); $debug = 1; # Create seed keyword structure. $seed_keyword = 'negativefalse/negative' . 'texttea/text' . 'typeBroad/type'; $use_synonyms = 'useSynonymstrue/useSynonyms'; # Get keyword variations. $request_xml = 'getKeywordVariations' . 'seedKeywords' . $seed_keyword . '/seedKeywords' . $use_synonyms . 'languagesen/languages
AdWords API just want to debug the demo of get_keyword_variations.php
hi,i want to use some Adwords api. and i have got developer_token and application_token, i use the demo of get_keyword_variations.php . But it returns List of additional keywords to consider has 0 variation (s). List of popular queries with given seed has 0 variation(s)., it shows maybe the method of getKeywordVariations not work rightly. i don't want to use APIlity,just to debug this.tks. The code of get_keyword_variations.php is below and i have replace the email and others using myown information and i can provide the right information about the email and password if necessary. # Provide AdWords login information. $email = 'INSERT_LOGIN_EMAIL_HERE'; $password = 'INSERT_PASSWORD_HERE'; $client_email = 'INSERT_CLIENT_LOGIN_EMAIL_HERE'; $useragent = 'INSERT_COMPANY_NAME: AdWords API PHP Sample Code'; $developer_token = 'INSERT_DEVELOPER_TOKEN_HERE'; $application_token = 'INSERT_APPLICATION_TOKEN_HERE'; # Define SOAP headers. $headers = 'email' . $email . '/email'. 'password' . $password . '/password' . 'clientEmail' . $client_email . '/clientEmail' . 'useragent' . $useragent . '/useragent' . 'developerToken' . $developer_token . '/developerToken' . 'applicationToken' . $application_token . '/applicationToken'; # Set up service connection. To view XML request/response, change value of # $debug to 1. To send requests to production environment, replace # sandbox.google.com with adwords.google.com. $namespace = 'https://adwords.google.cn/api/adwords/v12'; $keyword_tool_service = SoapClientFactory::GetClient( $namespace . '/KeywordToolService?wsdl', 'wsdl'); $keyword_tool_service-setHeaders($headers); $debug = 1; # Create seed keyword structure. $seed_keyword = 'negativefalse/negative' . 'texttea/text' . 'typeBroad/type'; $use_synonyms = 'useSynonymstrue/useSynonyms'; # Get keyword variations. $request_xml = 'getKeywordVariations' . 'seedKeywords' . $seed_keyword . '/seedKeywords' . $use_synonyms . 'languagesen/languages' . 'countriesUS/countries' . '/getKeywordVariations'; $variation_lists = $keyword_tool_service-call('getKeywordVariations', $request_xml); $variation_lists = $variation_lists['getKeywordVariationsReturn']; if ($debug) show_xml($keyword_tool_service); if ($keyword_tool_service-fault) show_fault($keyword_tool_service); # Display keyword variations. $to_consider = $variation_lists['additionalToConsider']; echo 'List of additional keywords to consider has ' . count ($to_consider) . ' variation(s).' . \n; $more_specific = $variation_lists['moreSpecific']; echo 'List of popular queries with given seed has ' . count ($more_specific) . ' variation(s).' . \n; ? tks helping me. Waiting for your response. Seam --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
AdWords API php/ my first journey to use Adwords api
i have got developer_token and application_token, i use the demo of get_keyword_variations.php . But it returns List of additional keywords to consider has 0 variation (s). List of popular queries with given seed has 0 variation(s)., it shows maybe the method of getKeywordVariations not work rightly. i use the code of get_keyword_variations.php below: # Provide AdWords login information. $email = 'INSERT_LOGIN_EMAIL_HERE'; $password = 'INSERT_PASSWORD_HERE'; $client_email = 'INSERT_CLIENT_LOGIN_EMAIL_HERE'; $useragent = 'INSERT_COMPANY_NAME: AdWords API PHP Sample Code'; $developer_token = 'INSERT_DEVELOPER_TOKEN_HERE'; $application_token = 'INSERT_APPLICATION_TOKEN_HERE'; # Define SOAP headers. $headers = 'email' . $email . '/email'. 'password' . $password . '/password' . 'clientEmail' . $client_email . '/clientEmail' . 'useragent' . $useragent . '/useragent' . 'developerToken' . $developer_token . '/developerToken' . 'applicationToken' . $application_token . '/applicationToken'; # Set up service connection. To view XML request/response, change value of # $debug to 1. To send requests to production environment, replace # sandbox.google.com with adwords.google.com. $namespace = 'https://adwords.google.cn/api/adwords/v12'; $keyword_tool_service = SoapClientFactory::GetClient( $namespace . '/KeywordToolService?wsdl', 'wsdl'); $keyword_tool_service-setHeaders($headers); $debug = 1; # Create seed keyword structure. $seed_keyword = 'negativefalse/negative' . 'texttea/text' . 'typeBroad/type'; $use_synonyms = 'useSynonymstrue/useSynonyms'; # Get keyword variations. $request_xml = 'getKeywordVariations' . 'seedKeywords' . $seed_keyword . '/seedKeywords' . $use_synonyms . 'languagesen/languages' . 'countriesUS/countries' . '/getKeywordVariations'; $variation_lists = $keyword_tool_service-call('getKeywordVariations', $request_xml); $variation_lists = $variation_lists['getKeywordVariationsReturn']; if ($debug) show_xml($keyword_tool_service); if ($keyword_tool_service-fault) show_fault($keyword_tool_service); # Display keyword variations. $to_consider = $variation_lists['additionalToConsider']; echo 'List of additional keywords to consider has ' . count ($to_consider) . ' variation(s).' . \n; $more_specific = $variation_lists['moreSpecific']; echo 'List of popular queries with given seed has ' . count ($more_specific) . ' variation(s).' . \n; function show_xml($service) { echo $service-request; echo $service-response; echo \n; } function show_fault($service) { echo \n; echo 'Fault: ' . $service-fault . \n; echo 'Code: ' . $service-faultcode . \n; echo 'String: ' . $service-faultstring . \n; echo 'Detail: ' . $service-faultdetail . \n; exit(0); } ? tks helping me. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
AdWords API how do i start to use the Adwords api
hi,i want to use some Adwords api. and i have got developer_token and application_token, i use the demo of get_keyword_variations.php . But it returns List of additional keywords to consider has 0 variation (s). List of popular queries with given seed has 0 variation(s)., it shows maybe the method of getKeywordVariations not work rightly. The code of get_keyword_variations.php is below and i have replace the email and others using myown information. # Provide AdWords login information. $email = 'INSERT_LOGIN_EMAIL_HERE'; $password = 'INSERT_PASSWORD_HERE'; $client_email = 'INSERT_CLIENT_LOGIN_EMAIL_HERE'; $useragent = 'INSERT_COMPANY_NAME: AdWords API PHP Sample Code'; $developer_token = 'INSERT_DEVELOPER_TOKEN_HERE'; $application_token = 'INSERT_APPLICATION_TOKEN_HERE'; # Define SOAP headers. $headers = 'email' . $email . '/email'. 'password' . $password . '/password' . 'clientEmail' . $client_email . '/clientEmail' . 'useragent' . $useragent . '/useragent' . 'developerToken' . $developer_token . '/developerToken' . 'applicationToken' . $application_token . '/applicationToken'; # Set up service connection. To view XML request/response, change value of # $debug to 1. To send requests to production environment, replace # sandbox.google.com with adwords.google.com. $namespace = 'https://adwords.google.cn/api/adwords/v12'; $keyword_tool_service = SoapClientFactory::GetClient( $namespace . '/KeywordToolService?wsdl', 'wsdl'); $keyword_tool_service-setHeaders($headers); $debug = 1; # Create seed keyword structure. $seed_keyword = 'negativefalse/negative' . 'texttea/text' . 'typeBroad/type'; $use_synonyms = 'useSynonymstrue/useSynonyms'; # Get keyword variations. $request_xml = 'getKeywordVariations' . 'seedKeywords' . $seed_keyword . '/seedKeywords' . $use_synonyms . 'languagesen/languages' . 'countriesUS/countries' . '/getKeywordVariations'; $variation_lists = $keyword_tool_service-call('getKeywordVariations', $request_xml); $variation_lists = $variation_lists['getKeywordVariationsReturn']; if ($debug) show_xml($keyword_tool_service); if ($keyword_tool_service-fault) show_fault($keyword_tool_service); # Display keyword variations. $to_consider = $variation_lists['additionalToConsider']; echo 'List of additional keywords to consider has ' . count ($to_consider) . ' variation(s).' . \n; $more_specific = $variation_lists['moreSpecific']; echo 'List of popular queries with given seed has ' . count ($more_specific) . ' variation(s).' . \n; function show_xml($service) { echo $service-request; echo $service-response; echo \n; } function show_fault($service) { echo \n; echo 'Fault: ' . $service-fault . \n; echo 'Code: ' . $service-faultcode . \n; echo 'String: ' . $service-faultstring . \n; echo 'Detail: ' . $service-faultdetail . \n; exit(0); } ? tks helping me. Waiting for your response. Seam --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
AdWords API Re: how do i start to use the Adwords api
i use the code below: # Provide AdWords login information. $email = 'INSERT_LOGIN_EMAIL_HERE'; $password = 'INSERT_PASSWORD_HERE'; $client_email = 'INSERT_CLIENT_LOGIN_EMAIL_HERE'; $useragent = 'INSERT_COMPANY_NAME: AdWords API PHP Sample Code'; $developer_token = 'INSERT_DEVELOPER_TOKEN_HERE'; $application_token = 'INSERT_APPLICATION_TOKEN_HERE'; # Define SOAP headers. $headers = 'email' . $email . '/email'. 'password' . $password . '/password' . 'clientEmail' . $client_email . '/clientEmail' . 'useragent' . $useragent . '/useragent' . 'developerToken' . $developer_token . '/developerToken' . 'applicationToken' . $application_token . '/applicationToken'; # Set up service connection. To view XML request/response, change value of # $debug to 1. To send requests to production environment, replace # sandbox.google.com with adwords.google.com. $namespace = 'https://adwords.google.cn/api/adwords/v12'; $keyword_tool_service = SoapClientFactory::GetClient( $namespace . '/KeywordToolService?wsdl', 'wsdl'); $keyword_tool_service-setHeaders($headers); $debug = 1; # Create seed keyword structure. $seed_keyword = 'negativefalse/negative' . 'texttea/text' . 'typeBroad/type'; $use_synonyms = 'useSynonymstrue/useSynonyms'; # Get keyword variations. $request_xml = 'getKeywordVariations' . 'seedKeywords' . $seed_keyword . '/seedKeywords' . $use_synonyms . 'languagesen/languages' . 'countriesUS/countries' . '/getKeywordVariations'; $variation_lists = $keyword_tool_service-call('getKeywordVariations', $request_xml); $variation_lists = $variation_lists['getKeywordVariationsReturn']; if ($debug) show_xml($keyword_tool_service); if ($keyword_tool_service-fault) show_fault($keyword_tool_service); # Display keyword variations. $to_consider = $variation_lists['additionalToConsider']; echo 'List of additional keywords to consider has ' . count ($to_consider) . ' variation(s).' . \n; $more_specific = $variation_lists['moreSpecific']; echo 'List of popular queries with given seed has ' . count ($more_specific) . ' variation(s).' . \n; function show_xml($service) { echo $service-request; echo $service-response; echo \n; } function show_fault($service) { echo \n; echo 'Fault: ' . $service-fault . \n; echo 'Code: ' . $service-faultcode . \n; echo 'String: ' . $service-faultstring . \n; echo 'Detail: ' . $service-faultdetail . \n; exit(0); } ? And the response you can see at the url of http:// ainihong001.byethost33.com/get_keyword_variations.php. tks it is my first to use the adwords api. and i have no idea. Seam. ainihong...@126.com On 2月14日, 上午2时31分, AdWords API Advisor adwordsapiadvi...@google.com wrote: If you're just getting started with AdWords API development, I'd recommend that you first read through the official documentation: http://code.google.com/apis/adwords/docs/developer/index.html If your language of choice is PHP, I'd recommend that you use the APIlity client library instead of the sample code. The sample code is meant to provide a standalone reference as to how to call certain API functions, but isn't the right choice if you're developing a full application. APIlity can be downloaded from http://google-apility.sourceforge.net/ If you're still having problems, please provide a log of the SOAP request and response that you're sending and receiving, making sure that you X out your token and password information. Cheers, -Jeff Posnick, AdWords API Team On Feb 13, 11:05 am, ainihong001 ainihong...@126.com wrote: i have got developer_token and application_token, i use the demo of get_keyword_variations.php . But it returns List of additional keywords to consider has 0 variation (s). List of popular queries with given seed has 0 variation(s)., it shows maybe the method of getKeywordVariations not work rightly. tks helping me. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---