--
You received this message because you are subscribed to the Google Groups "LightSpeed Cloud API Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to merchantos-api-dev...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
To unsubscribe from this group and stop receiving emails from it, send an email to merchantos-api-developers+unsub...@googlegroups.com.
String authtoken = <apikey generated in lightspeed cloud settings>;
String targetURL = "https://api.merchantos.com/API/Account/";
GetMethod get = new GetMethod(targetURL);
get.setRequestHeader("apikey",authtoken);
HttpClient httpclient = new HttpClient();
PrintWriter myout = null;
Response is 401
Kind regards,
Munira M.
String authtoken = <apikey generated from LightSpeed Cloud settings>;
String targetURL = "https://api.merchantos.com/API/Account/";
GetMethod get = new GetMethod(targetURL);
get.setRequestHeader("apikey",authtoken);
HttpClient httpclient = new HttpClient();
PrintWriter myout = null;
Response is 401 as follows:
getResp=======>
<?xml version="1.0"?>
<Error>
<httpCode>401
</httpCode>
<httpMessage>Unauthorized
</httpMessage>
<message>Invalid username/password or API key.
</message>
--
You received this message because you are subscribed to the Google Groups "LightSpeed Cloud API Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to merchantos-api-dev...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to merchantos-api-dev...@googlegroups.com.
Hello John,How are you doing the basic authentication? If curl is working for you, that's a good sign that your credentials are correct and that basic auth is working, but it might be an error in your client. How are you sending the authorization information from your client?--Kalen
On Fri, Aug 2, 2013 at 6:30 AM, JohnO <jo...@gypsywarrior.com> wrote:
Hey Kalen,
The application is developed using .NET framework. It uses basic http authentication. I have confirmed that using curl the API works normally, but that is not an option for my application.
On Thursday, August 1, 2013 5:43:24 PM UTC-4, Kalen Petersen wrote:
Hello John,We recently made some updates to authentication in our system in order to fix some problems with rate limiting. What sort of authentication and client do you use to access the API?It is a known issue that the browser will no longer prompt you for credentials. Try using curl to make your call, passing it an option like "-u user:pass". This way you are guaranteed to use Basic authentication, unlike in the browser. We have a fix for this, so that the browser will prompt for credentials if necessary, and it should be out soon.--Kalen
On Thu, Aug 1, 2013 at 1:46 PM, JohnO <jo...@gypsywarrior.com> wrote:
Hello all,
I have developed a custom application that pulls orders from the Magento GO API and creates Sales in LightSpeed using that API in order to do a 1-way sync of inventory levels. Checking my logs, on or around 7/31/13 I began to receive HTTP 401 Unauthorized errors.
The URL causing the error is: https://api.merchantos.com/API/Account/31858/Item?systemSku=xxxxx
(replace xxxxx with a sku)
I believe I should be able to put that URL into my web browser and, after entering my credentials to the prompt, see the xml response. That's how it worked when I was developing the application. Now if i plug in that URL, I get no dialog for entering credentials and all I see is " 401 Unauthorized Invalid username/password or API key."
I have also tried passing credentials in the form (https://LongHexStringRemoved:api...@api.merchantos.com/API/Account/31858/Item?systemSku=xxxxx) but again to no avail. I'm not sure what could have happened for this process to all of a sudden start receiving these 401 errors, as there haven't been changes to the code (or the API account).
Any light that could be shed on this would be appreciated.
--
You received this message because you are subscribed to the Google Groups "LightSpeed Cloud API Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to merchantos-api-developers+unsubsc...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
To unsubscribe from this group and stop receiving emails from it, send an email to merchantos-api-developers+unsub...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to merchantos-api-dev...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to merchantos-api-developers+unsubsc...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.