/    Sign up×
Community /Pin to ProfileBookmark

SoapFault exception: [HTTP] Authorization Required

Hi everyone,

I’m trying to implement a Soap Client for Amazon Seller Central, and get this error when trying to run a document request:

[CODE]Fatal error: Uncaught SoapFault exception: [HTTP] Authorization Required[/CODE]

I’m not sure if it’s actually sending the request and this is the result, or if there’s a problem with the request?

Anyway, Amazon’s documentation is lacking (I’m being generous when I say that) and they don’t explain how to authenticate… if that’s even the issue.

Here’s the code I’m using:

[code=php]
$ACS = new AmazonSellerCentral();
$ACS->DoSomething();

class AmazonSellerCentral {

const WSDL = ‘AMZ.wsdl.xml’;
private $Soap;

function __construct()
{
$this->Soap = new SoapClient(self::WSDL, array(‘login’ => “MY_SELLER_TOKEN”,
‘password’ => “MyPassword”));

}

function DoSomething()
{
echo $this->Soap->getAllPendingDocumentInfo(‘MY_SELLER_TOKEN’, ‘_GET_ORDERS_DATA_’);
}
} // END Class
[/code]

Any help is appreciated.

Thanks,

Nick

to post a comment
PHP

0Be the first to comment 😎

×

Success!

Help @lightnb spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...