HTTP method POST is not supported by this URL

28 views
Skip to first unread message

rwhite35

unread,
May 21, 2009, 12:37:05 PM5/21/09
to AdWords API Forum, rwh...@october-design.com
Hello All,

I'm Logging in to AdWords Sandbox API for the first time and having
trouble. When I enable error reporting I get this error:

HTTP method POST is not supported by this URL, Error 405

The URL it appears to be requesting is: sandbox.google.com

I've downloaded the APIlity library from this tutorial:
http://awapiday.googlepages.com/index.html#before_you_start

APIlity.php and lib are in the same directory as my test script. I
have an MCC account and both tokens are valid; authentication.ini and
settings.ini have both been updated with the correct information.

Here is my script:
<?PHP

require_once("apility.php");

//Create the header variables for logging in to the sandbox
$headers = array();
$headers["Email"] = "my@mcc_email.com";
$headers["Client_Email"] = "my@adwords_client_email.com";
$headers["Password"] = "XXXXXX";
$headers["User_Agent"] = "PHP Demo Application";
$headers["Developer_Token"] = "XXXXXXXX";
$headers["Application_Token"] = "XXXXXXXXX";
$user = new APIlityUser();
$user->setContext($headers);

$clientAccounts = getManagersClientAccounts();
foreach($clientAccounts as $clientAccount) {
print("Client account: $clientAccount\n");
}

//Print out SOAP conversation
print_r($user->getLastSoapRequests());
print_r($user->getLastSoapResponses());

?>

---

Your help is greatly appreciated.
rwhite35

AdWords API Advisor

unread,
May 21, 2009, 5:25:33 PM5/21/09
to AdWords API Forum
Hello,

I'm not entirely sure as to what would be causing your POSTs to go
directly to http://sandbox.google.com/. You might want to ask in the
dedicated APIlity discussion group as well:

http://groups.google.com/group/adwords-api-php

Cheers,
-Jeff Posnick, AdWords API Team
Reply all
Reply to author
Forward
0 new messages