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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

How to get Thingworx login token

vxba
10-Marble

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
10-Marble
(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

Announcements


Top Tags