Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
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?
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.
Correct, token return from login API call, then use that token to call another API services.
Is it possible?
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.
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