Skip to main content
12-Amethyst
August 1, 2017
Solved

Thingworx8 Run Mashup with appkey

  • August 1, 2017
  • 11 replies
  • 7501 views

What is the Thingworx 8 alternative to sending the appkey as part of the URL to view a mashup?  We are building screens that will be for visual display so they will not have any input devices attached.  We need the Mashup to launch without user interaction.  I do not want to send the appkey in the URL since that has been deprecated.

Best answer by sclement1

The way to get around supplying the appKey in the URL is to write a custom Authenticator.  This was suggested to me by PTC support.  Here is a link with instructions on how to do that.

Custom Authenticator Example

11 replies

13-Aquamarine
August 1, 2017

Hi Steven,

An alternative to sending the app key as part of URL is to include the required application key in the request’s headers. Please refer the attached document for more details. https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS264349

sclement112-AmethystAuthor
12-Amethyst
August 1, 2017

Thank you for the response but I'm missing a piece.  I can't figure out how to load a Mashup from the information in the document.  I've tried doing a GET request to ./Thingworx/Mashups/<mashup name> with the appKey in the header.  I've also tried to do the same to ./Thingworx/Runtime/index.html#mashup=<mashup name>.  Neither seems to work.

13-Aquamarine
August 2, 2017

Steven,

Did you try adding "accept": "application/json" and "content-type": "application/json" along with the app key in the header?

5-Regular Member
August 2, 2017

Hi Steven,

You could try this link

http://<ThingWorxServer>:<ThingWorxPort>/Thingworx/Mashups/<YourMashupName>?appKey=<YourAppKeyHere>&x-thingworx-session=true


Details is in this link

sclement112-AmethystAuthor
12-Amethyst
August 2, 2017

Using the appKey in the URL has been deprecated in Thingworx 8 and disabled by default.  You can re-enable it however they state it may be completely removed in the future for security reasons.  I'm trying to figure out the new way of doing this instead of using the deprecated feature.

sclement112-AmethystAuthorAnswer
12-Amethyst
October 19, 2017

The way to get around supplying the appKey in the URL is to write a custom Authenticator.  This was suggested to me by PTC support.  Here is a link with instructions on how to do that.

Custom Authenticator Example