Error trying to pull data from Onsite

ClayGClayG Posts: 3Member
Authorized the license key and refreshed the server.  Returning an error.

he remote server returned an error: (401) Unauthorized server.unauthorized.
Customer Error: Value cannot be null.
Parameter name: s

What am I doing wrong?

Answers

  • jamesratcliffejamesratcliffe Posts: 160Administrator, Lightspeed Staff moderator
    @ClayG: Usually a 401 error means that the username and password are incorrect or the user agent is invalid. The full response body should have more information.
    James Ratcliffe
    API Integrations Specialist
    Lightspeed HQ
  • ClayGClayG Posts: 3Member
    @ClayG: Usually a 401 error means that the username and password are incorrect or the user agent is invalid. The full response body should have more information.
    The remote server returned an error: (401) Unauthorized server.unauthorized.
    Value cannot be null.
    Parameter name: s
      at System.IO.StringReader..ctor (System.String s) [0x00009] in <bb7b695b8c6246b3ac1646577aea7650>:0 
      at (wrapper remoting-invoke-with-check) System.IO.StringReader..ctor(string)
      at PetStoresLighSpeedOnsite.PetStoresLighSpeedOnsite.Main (System.String[] CmdArgs) [0x007dc] in <5bf4e7288fe94a36ba8feecb35118130>:0 
  • jamesratcliffejamesratcliffe Posts: 160Administrator, Lightspeed Staff moderator
    That looks like a .Net/C# error. The response from OnSite will always be in XML (sometimes containing a Python error).

    We'll need the response body that's coming directly from OnSite to be able to give more specific help. Most like there's something wrong with the user agent or authorization string.
    James Ratcliffe
    API Integrations Specialist
    Lightspeed HQ
Sign In or Register to comment.