Skip to main content
Aug 4, 2021 4:26 AM UTC
Question

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

Aug 4, 2021 1:11 PM UTC

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.

vxbaAuthor
Aug 5, 2021 3:48 PM UTC

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

Is it possible?

Aug 5, 2021 7:11 PM UTC

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.

Aug 19, 2021 6:29 PM UTC

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