Hi, I've been running into this problem for the last couple of days and now am trying my luck here. I seem to be having problems fetching my authentication token.
I tried my log-in info for v13 to verify that I was sending the correct data in the headers, and everything ran smoothly. I didn't really change anything in the sample code for 'add campaign', so I'm not quite sure what the hang up is. add_campaign.php as follows $email = '[email protected]'; $password = 'xxxxx'; $client_email = '[email protected]'; $user_agent = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: 1.9.1.5) Gecko/20091102 Firefox/3.5.5'; $developer_token = 'xxxxxx'; $application_token = 'xxxxxx'; $account_type = 'GOOGLE'; $service = 'adwords'; $namespace = 'https://adwords.google.com/api/adwords/cm/v200906'; $auth = new AuthToken($email, $password, $account_type, $service); AuthToken.php as follows: $this->email = urlencode($email); $this->passwd = urlencode($passwd); $this->account_type = $account_type; $this->service = $service; $this->source = 'Google-AWAPI PhpSamples-v4.0.0'; $post_vars = 'accountType=' . $this->account_type . '&Email=' . $this->email . '&Passwd=' . $this->passwd . '&service=' . $this->service . '&source=' . $this->source;; $ch = curl_init($post_url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_vars); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $this->res = curl_exec($ch); error: AuthenticationError.USER_ID_INVALID @ ; trigger:'Invalid ads user id in loginCookie. User id: -1' $this->res isn't being set. XML headers being sent after the fact: <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/ envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP- ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns6613="http:// tempuri.org"> <SOAP-ENV:Header> <RequestHeader xmlns="https://adwords.google.com/api/adwords/ cm/v200906"> <authToken></authToken> <clientEmail>[email protected]</clientEmail> <password>xxxxx</password> <userAgent>Mozilla/5.0 (Windows; U; Windows NT 5.1; en- US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5</userAgent> <developerToken>xxxxx</developerToken> <applicationToken>xxxxx</applicationToken> </RequestHeader> </SOAP-ENV:Header> <SOAP-ENV:Body> <mutate xmlns="https://adwords.google.com/api/adwords/cm/ v200906"> <operations> <operator>ADD</operator> <operand> <endDate>20101001</endDate> <name>Test Campaign - 1260373797</name> <status>PAUSED</status> <biddingStrategy xsi:type="ManualCPC"/> <budget> <period>DAILY</period> <amount> <currencyCode>USD</currencyCode> <microAmount>100000</microAmount> </amount> <deliveryMethod>STANDARD</deliveryMethod> </budget> </operand> </operations> </mutate> </SOAP-ENV:Body> </SOAP-ENV:Envelope> have any ideas? thanks! -- 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.
