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

Unable To Connect Over REST

SOLVED
Level 7

Unable To Connect Over REST

We have a Thingworx 8.1 server running, and I'm unable to perform any REST API calls on it. I've tried in both postman and curl at various URLs, starting from as simple as https://server.com/Thingworx/Things?appKey=[appkey] as well as on various things. No matter what, the response is a 401 with no body. The app key is valid and I've tried generating 3 or 4 different ones at this point just to make sure that they ARE valid. My user can, of course, view the things that I'm querying against (why I went for specific things instead of calling it at just /Thingworx/Things.) Anyone have pointers for what could be going wrong?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Unable To Connect Over REST

You have to enable the use of your appkey in the queary via Platform Settings subsystem.

 

Let me know if you need any help with that.

3 REPLIES

Re: Unable To Connect Over REST

You have to enable the use of your appkey in the queary via Platform Settings subsystem.

 

Let me know if you need any help with that.

Re: Unable To Connect Over REST

That worked, thanks. For others reference, you need to go to home / Subsystems / PlatformSubsystem / Configuration and enable "Allow Application Key As URL Parameter."

 

Do you happen to know why this requirement isn't mentioned in the "Create An Application Key" or "REST API Reference Guide" tutorials, especially given that URL parameters are the default in those tutorials. The fact that you can also use a request header instead of a query parameter is only given a passing mention and never used in examples in the REST Reference Guide. It never comes up at all in REST Core Concepts.

Highlighted

Re: Unable To Connect Over REST

Allowing an appKey as a URL parameter was the default when the guides you mentioned were written, and allowing an appKey in a URL is set as the default for the 30 day hosted trial servers, we will update the guides to reflect the change.

 

This guide has a section on authentication:

https://developer.thingworx.com/resources/guides/thingworx-rest-api-quickstart/authentication-discus...