Receive email notifications by changing your settings.
Click on your picture in the top right corner, go to Preferences and select your notification preferences.
Click on your picture in the top right corner, go to Preferences and select your notification preferences.
Thank you for contributing to our forum!
Please keep in mind:
1. To only comment on the topic where the discussion is about. Do you have a new question or topic? Please start a new discussion.
2. Be kind to other users!
Please keep in mind:
1. To only comment on the topic where the discussion is about. Do you have a new question or topic? Please start a new discussion.
2. Be kind to other users!
Generate session token automatically
Is it possible to generate a session token from code? Or do I always need to open the platform interface to retrieve a token? At the moment I've got to replace the token manually in my FME workspace every time I start working with the API.
Tagged:
Comments
Hi!
coincidentally, just yesterday we've had an online webinar about the upcoming release, and part of what we presented was our now available pythonSDK for tygron. One of the primary basic examples included is a script which demonstrates how to start a session and obtain the api token associated with it. In FME, it is possible to add a PythonCaller transformer, in which the sdk can be imported and used to start a session.
The PythonSDK can be found here: https://github.com/Tygron/python-tygronsdk
It is also possible to create your own calls which interact with the Tygron API. For more information on how to communicate with the API directly, I recommend reading through the available API tutorial, with the "Sessions" chapter in particular.
The API tutorial, and specifically the "Sessions" chapter, can be found here: https://support.tygron.com/wiki/API_tutorial#Sessions
Finally, depending on your use case you may find it easier to place your session in Keep Alive mode, so that the API token does not change. For more information on Keep Alive mode, see our documentation here: https://support.tygron.com/wiki/Keep_alive
Also, please check out my earlier forum tip regarding FME, in which I've set up a simple workspace in which the api token is a separate user-parameter, which may make it easier to input it when appropriate.
The forum post with the FME example can be found here: https://community.tygron.com/forum/discussion/560/fme-and-the-tygron-platform
Sprawling spreadsheets so intricate Alexander the Great cuts them in half.