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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

How to get Thingworx login token

vxba
7-Bedrock

How to get Thingworx login token

I'm writing a web application and need to get a user login token to call api ...

(Not use appkey, require user login with username and password then return a token.)

How can I do that?

4 REPLIES 4
PaiChung
22-Sapphire I
(To:vxba)

Is this token generated by an API call?

Would first auth into ThingWorx, make the call for a token after that and then pass that token in the API call for the information that you need.

vxba
7-Bedrock
(To:PaiChung)

Correct, token return from login API call, then use that token to call another API services.

Is it possible?

PaiChung
22-Sapphire I
(To:vxba)

Since tokens are usually valid for a certain amount of time, I would say yes.

You can temporarily store the token in a property and use it in your other services/API calls.

When the call returns an error you make another call for a new token.

slangley
23-Emerald II
(To:vxba)

Hi @vxba.

 

If you feel your question has been answered, please mark the appropriate response as the Accepted Solution for the benefit of others with the same question.

 

Regards.

 

--Sharon

Top Tags