Hello, Please do not post confidential information like your password or tokens in a public group (I asked you to X it out, meaning replace it with XXXX characters). I've manually reset your information to prevent others from using it. You'll have to log in to the AdWords web interface to retrieve your new Developer token from the AdWords API Center page.
What I'm asking for is the XML of your request and response messages, not the PHP code you're using to generate the requests. Since you have $debug set to 1, the XML should be printed out by the show_xml() function. When you post your XML request and response messages, PLEASE do not include your password or token information. Cheers, -Jeff Posnick, AdWords API Team On Feb 19, 8:18 am, ainihong001 <[email protected]> wrote: > 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 = '[email protected]'; > $password = 'beejaa2009'; > $client_email = '[email protected]'; > $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 = > '<negative>false</negative>' . > '<text>mars cruise</text>' . > '<type>Broad</type>'; > $use_synonyms = '<useSynonyms>true</useSynonyms>'; > > # Get keyword variations. > $request_xml = > '<getKeywordVariations>' . > '<seedKeywords>' . $seed_keyword . '</seedKeywords>' . > $use_synonyms . > '<languages>en</languages>' . > '<countries>US</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 <[email protected]> > 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 <[email protected]> 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 = > > > '<negative>false</negative>' . > > > '<text>tea</text>' . > > > '<type>Broad</type>'; > > > $use_synonyms = '<useSynonyms>true</useSynonyms>'; > > > > # Get keyword variations. > > > $request_xml = > > > '<getKeywordVariations>' . > > > '<seedKeywords>' . $seed_keyword . '</seedKeywords>' . > > > $use_synonyms . > > > '<languages>en</languages>' . > > > '<countries>US</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 [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 -~----------~----~----~----~------~----~------~--~---
