Skip to main content
Question

rest api - want to create a session token


gkvoelkl
Contributor
Forum|alt.badge.img+2

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

best regards Gerhard

3 replies

alexbiz
Enthusiast
Forum|alt.badge.img+12
  • Enthusiast
  • May 26, 2025

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.


gkvoelkl
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • May 26, 2025

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.


alexbiz
Enthusiast
Forum|alt.badge.img+12
  • Enthusiast
  • May 26, 2025

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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings