Skip to main content
1-Visitor
August 4, 2021
Question

How to get Thingworx login token

  • August 4, 2021
  • 2 replies
  • 4614 views

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?

2 replies

22-Sapphire I
August 4, 2021

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.

vxba1-VisitorAuthor
1-Visitor
August 5, 2021

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

Is it possible?

22-Sapphire I
August 5, 2021

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.

Support
August 19, 2021

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