stamps.com php SOAP集成。 (404)未找到错误?

时间:2016-09-04 18:25:39

标签: php soap http-status-code-404 stamps.com

我正在尝试使用stamps.com API和php验证用户,我收到以下错误:

:  Uncaught SoapFault exception: [soap:Server] Server was unable to process request. ---> The remote server returned an error: (404) Not Found.

这是我的PHP代码:

//Authenticate Stamps.com SOAP API
 $IntegrationID = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
 $Username = "XXXXXXXXXXXXXXX";
 $Password = "XXXXXXXXXXXXXXX";
 $wsdl =  "https://swsim.testing.stamps.com/swsim/swsimv50.asmx?wsdl";

 //Authenticate User
 $authData = array(
    "Credentials"  => array(
        "IntegrationID"  => $IntegrationID,
        "Username"       => $Username,
        "Password"       => $Password
                            )
    );

$client = new SoapClient($wsdl);
$auth = $client->AuthenticateUser($authData);
$AuthenticatorToken = $auth->Authenticator;

我似乎无法在任何地方找到解决方案,任何想法可能导致错误?

1 个答案:

答案 0 :(得分:1)

Stamps.com API要求您注册为开发人员并提供您的IP地址,以便他们可以在使用API​​之前将其添加到API白名单中。

如果您还没有使用Stamps.com注册开发者帐户,可以在此处注册:http://developer.stamps.com/developer/register/