TM1 Web API session login

Use the session token login approach to uniquely identify your TM1® Web session. This login approach is recommended for the URL API. Use the TM1 session ID login approach to uniquely identify a TM1 server session, which might have multiple TM1 Web sessions. Use the session and login modules for easier session management with the JavaScript library.

Session token login

The session token login returns a unique session token that represents a login session for a specific user, Admin host, and TM1 server combination.

Important: Each TM1 Web session is associated with an HTTP session. The TM1 Web session token can be used only under the HTTP session in which it was created. You cannot save a TM1 Web session token, open a browser on another device, and get access to the TM1 Web session that corresponds to that session token because the HTTP session is different.

You can use the JavaScript XMLHttpRequest API to send an HTTP login request to the TM1 Web server. The session token is then returned in a JavaScript Object Notation (JSON) format from the request. After you receive the session token, you can then use it when you open TM1 Web objects.

If a timeout occurs with your HTTP session from inactivity, the TM1 Web session and related token are no longer valid.

TM1 Session ID login

Users can also log in by specifying a TM1 server session with a TM1SessionId. The TM1 server session that is used by a TM1 Web session will never change and must be generated or specified on creation. Multiple TM1 Web sessions can use the same TM1 server session.

Session and Login modules

In the JavaScript library, you can use the session and LoginDialog APIs to manage sessions and login dialog boxes.

For more information, see Session and LoginDialog modules.