Skip to main content

Want to create a Session Token with JavaScript and api. What is the way to do it with rest api v3?

best regards Gerhard

Hey Gerhard, 

you can find the Create token endpoint documentation here :

https://docs.safe.com/fme/html/FME_REST/apidoc/v3/#!/tokens/createForm

I can't help you with the javascript part though.


I want to create Session Token and not api Token. The documentation does not explain, which Token will be created. I need an JavaScript example. In the Safe JavaScript examples they use an older deprecated api. Perhaps there is an fme developer forum.


After some testing and digging, I found that the trick to create a session token instead of an API token is to add the s=1 parameter:

http://FMEFLOWURL/fmerest/v3/tokens/?s=1

The rest of the request remains the same.


Reply