mike999 Posted May 18, 2015 Share Posted May 18, 2015 Webservice: We made a new complete clean installation with 1.6.and have made new key and have keept all the "Show Get" and "Modified PUT" as it should as we had in our earlier installation when using 1.5 that worked well. addresses GET carriers Get countries GET customers GET order states Get orders GET & PUT products GET combinations GET We can see that when using the api test it makes the the right XML in the webpage .And we on the website can se the order with product detail But when the logistic compony is trying to get the order for packing. They just get as follow:' " The remote server returned an error: (401) Unauthorized. " What wrong here? Link to comment Share on other sites More sharing options...
Dh42 Posted May 18, 2015 Share Posted May 18, 2015 It looks like they are not sending the username and password for the connection properly, it is denying them access because of that. Link to comment Share on other sites More sharing options...
FredrikS Posted May 19, 2015 Share Posted May 19, 2015 We have exactly the same problem. When starting fresh with Prestashop version 1.6 our program developed in .net gets error 401 from the webservice. The key is correct and works in any browser, could it be a unicode problem or something? Link to comment Share on other sites More sharing options...
massimopasquali Posted October 30, 2015 Share Posted October 30, 2015 me too Have you solved? Link to comment Share on other sites More sharing options...
emartinez0131 Posted November 3, 2016 Share Posted November 3, 2016 (edited) It appears that a year has gone by, and no one posted a solution. I am having a similar issue - the difference is that at one time, my store did connect, but that was before I completed an import of products and customers. After I had the site completely setup, I noticed that none of my shipping data was uploading, so I tested my connection again, and now the API reports the 401 error. The exact error is: "We received an error testing the PrestaShop store: The remote server returned an error: (401) Unauthorized." I have looked at everything our server host recommended, and also the API vendor. Nothing works. I have other PrestaShop stores connected to the same API vendor - no issues. Exact same configuration. My site is live, and we have between 5,000-10,000 visitors daily - so, a fresh re-installation just isn't feasible. This seems to be a permissions issue - just not sure where to go change permissions. Any help is appreciated. Edited November 3, 2016 by emartinez0131 (see edit history) Link to comment Share on other sites More sharing options...
Dh42 Posted November 3, 2016 Share Posted November 3, 2016 Are all sites on the same server? Link to comment Share on other sites More sharing options...
emartinez0131 Posted November 3, 2016 Share Posted November 3, 2016 I have two servers. Both have sites connected to the API successfully. Just this particular one that is being stubborn. Link to comment Share on other sites More sharing options...
Dh42 Posted November 3, 2016 Share Posted November 3, 2016 What I am trying to figure out is if you have had a site on this server connect to the api. I am suspecting that your php interpreter might be different on the servers and is causing the issue. Link to comment Share on other sites More sharing options...
emartinez0131 Posted November 3, 2016 Share Posted November 3, 2016 The site that has the issue had originally connected successfully, however, I had a temporary URL assigned to the site during development. After the site went live, I changed the URL, and created a brand new connection to the API vendor - this time, it refused to connect, returning the 401 error I described above. Link to comment Share on other sites More sharing options...
Dh42 Posted November 3, 2016 Share Posted November 3, 2016 Did you update your webservice api key with the vendor? You might try generating a new one. Link to comment Share on other sites More sharing options...
emartinez0131 Posted December 20, 2016 Share Posted December 20, 2016 Thank you for your insights Dh42, but after all of the time that has passed since the last post, we are no closer to solving the issue, and our vendor seems "uninterested" in finding a resolution. I have multiple sites connected on two different servers. Other sites on this same server are connected with no issues. I recreated a smaller version of my site as a sandbox/test on the same server, and it connects successfully. The only conclusion I can come to is that our copy of the store has suffered some corruption in the Webservice code. We have decided that we will recreate the site manually - no imports - since every other site we've setup in this manner works flawlessly. Not really sure what happened during the import, but we thought we were going to save a lot of time by bringing our 9000 + products, 12000+ customers, and partial orders (18000). We have not saved any time. By having to go back and try to fix the problems that cropped up after the massive import, we've actually lost time. I just wanted to post our experiences here, in the event that someone else is finding similar issues after a data import. From what I can tell, we should not be having these issues, but that doesn't change the fact that we are. Good luck to all. Link to comment Share on other sites More sharing options...
emartinez0131 Posted August 18, 2017 Share Posted August 18, 2017 I finally solved this issue. I hired Fred & Co. at Prestaheroes to take a look. While they couldn't find anything wrong code-wise, they did advise me to look at a secondary domain name that kept showing up. I host using cPanel/WHM, and one of the things that had been done was after the PS was fully developed and ready for "prime time," the live site's domain was "parked" on top of the development domain, and PS was told to use the live domain. Everything worked beautifully -- except, Webservice. Following up on the tip from Prestaheroes, I removed the parked live domain, modified the development domain's name to the live one, and VOILA! Everything still works beautiful, and Webservice now connects to the shipping host we use. It was that simple - but it eluded me for almost a year. We did shipping manually to our shipping processor, until this week. Oh happy days! Thanks to everyone for their input, advice, and overall good will. Great forum! --Ed Link to comment Share on other sites More sharing options...
Recommended Posts