cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

TWx 7.2 asks for Username and Password when AppKey is in URL

nmilleson
17-Peridot

TWx 7.2 asks for Username and Password when AppKey is in URL

I have a microcontroller that is sending REST calls to ThingWorx with the AppKey in the URL.  I have also been duplicating the call on Chrome's ARC.  It has been working for a couple months and this week it suddenly started asking for username and password when I enter the call through ARC.  All of the microcontroller calls are now failing with a 401 error.  We checked if any of our TWx settings have changed over the last week and they are all the same.  We did add a few users last week but the calls were still going through after we added them.

Thank you for any suggestions or help.

1 ACCEPTED SOLUTION

Accepted Solutions

I don't know if this will entirely resolve the issue, but the correct syntax for the field name is appKey, not app-Key

View solution in original post

9 REPLIES 9
posipova
20-Turquoise
(To:nmilleson)

Is there a composer opened in the same session?

Has the original appkey been changed or possibly removed?

We have tried with and without a Composer session opened.  On both URLs we are using the x-thingworx-session=true option.

The original appKey is still there unchanged as well.

posipova
20-Turquoise
(To:nmilleson)

I would not expect it to work with a Composer session open.

If, say, one logged into Tab1 to Composer via User1. The browser now has a session. In Tab2 one tries to send a request using an application key, but the browser already has a session from Tab1 and the Composer and User1. It won't use the application key supplied with the URL request even if the application key represents a different user.
When logging out of Composer from Tab1, the user kills that session used for both Tab1 and Tab2. The url in Tab2 is now also logged out.

If the request you were trying to send was not accessible by the composer tab (though the application key that you used had access), I'd expect you to get an exception.

Does it happen in  different browsers? Could you please supply the full URL (or rather the format) you are using (don't have to include the real app key)

Tried logging out again and in a different browser.  Same results.  Here is the url format:

http://server:8080/Thingworx/Things/SensorHubThing/Services/UpdateValues?app-Key=[appkey]&method=post&x-thingworx-sessio…

I don't know if this will entirely resolve the issue, but the correct syntax for the field name is appKey, not app-Key

We have seen the same issue with ThingWorx 7.1 asking for an ID and PW. It had been working for several months before we started seeing this popup. Our URL is https://<serverHere>/Thingworx/Home/?appKey=<appKeyHere>-thingworx-session=true

Has anyone figured out why?

posipova
20-Turquoise
(To:mwilson11)

Do you have a composer open in the same browser session?

No, these are systems on our shop floor that are pretty locked down.  They don't even know there is such a thing as Composer.  =)

posipova
20-Turquoise
(To:mwilson11)

COuld you please open a support ticket or a separate thread in the community regarding this?

Thank you for your patience

Top Tags