Jump to content

Authentication problem sending URL request via code using Web Service


derenyi

Recommended Posts

Hello,

 

The problem is: 

I am trying to use Presta's WebService, by sending url requests programatically, using WinHttpRequest.

I use PS1.6, I configured what I had to in BO, if I type this url into a browser, everything works fine:

http://[email protected]/api/

 

But when I try it using WinHttpRequest, the answer is: "401 Unauthorized"

 

It is obviously so, because Presta prompts me for user password, as it is written in the developer's documentation:

http://doc.prestashop.com/display/PS16/Chapter+2+-+Discovery+-+Testing+your+access+to+the+web+service+with+the+browser

"The shop should prompt you for a username and a password to enter"

 

I just can't figure out, how to get around this problem. (Actually, I do not really see why Presta prompts me again for the authentication key, which is already in the url?)

 

Any suggestion would be really appreciated!

 

Thank you, bye,

Istvan

Edited by derenyi (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...