Skip to main content
1-Visitor
October 9, 2014
Question

Authentication issues with appKey in HTTP session, alternating

  • October 9, 2014
  • 4 replies
  • 3657 views

Hi,

not sure if this is a known issue or even an issue at all, but I observe the following behavior when working in a HTTP session when using an appKey only, e.g. when accessing the REST API and not logging in.

E.g. open a Chrome incognito window. Paste in a URL with an appKey

The first time this call returns the desired result. The second time (hit Ctrl-R or refresh), I get an error page:

"HTTP Status 401 - No authType or appKey parameter has been specified for Authentication Scheme: AUTH_THINGWORX_APPKEY"

Another Ctrl-R refresh brings back the normal call result and the next one again the error. It alternates.

The same alternating errors occur from within my http client library that I use to access the REST API when I use sessions. This basically requires that I cannot use the session capability and must create a new request every single call. Also happens in a normal browser window when not doing password authentication.

After password authentication with ThingWorks, it works fine in normal browser windows.

Is this intended or an issue?

Thanks!

4 replies

19-Tanzanite
October 10, 2014

Hi Dwight,
Do you also use the x-thingworx-session=true in the url?
I had this behaviour when not using this url parameter set to true.

BR,
Vladimir



dwightwhe1-VisitorAuthor
1-Visitor
October 10, 2014

Thanks Vladimir,

this solves it.
Best