Use this api call to get a ticketId valid for api calls for a pre-defined time in seconds. A ticketId can be used to provide credentials with an expiring token. A ticketId can be used instead of a login/ password combination. Utilize this function to perform api calls without sending login details for each api call.
In order to get a ticketId for an Opentracker.net account, use this URL to perform a GET or POST request.
The following parameters are required:
login: is the email used to login to opentracker.net, with the associated permissions/ roles.
password: the password of the user/email account.
expires: time in seconds in which the ticket expires. The default is  seconds.
Page returns a ticketId when request successful. An example is
The ticketId can be used for other api calls.
If an error occurs (for example wrong login/ password combination) then
false is returned.
https://api.opentracker.net/api/management/login_user.jsp?login=myLogin&password=myPassword&expires=600should return for example
false if an error occurs.
Opentracker supports an authorization-token (aka ticket-id system), for users who want to use a random-uuid instead of using the login and a password in an api-call.
https://api.opentracker.net/api/management/login_user.jsp is the api call used to create an authorization token/ ticketId.
An authorization-token / ticketId is created by passing your login and password, for example:
The output generated is your new token id. Here is an example:
If the api call is not successful, then ‘false’ is returned.
The token is valid for 60 seconds by default.
The time frame can be increased by passing the duration in seconds as the parameter “expires”.
For example, in order to create a token which expires after an hour, the api call would look like this:
With tokens, you can access data from all api calls instead of passing login and password parameters. For example, the 'top pages' (most popular pages) api call can be accessed as follows:
Note: After the expiration of the token, it is no longer possible to access the api call, and an exception occurs, stating that the ticket id is not valid.
You can confirm if your token is valid or not by use of the following api call :
Api calls returns 1 ticketId is valid, else 0 otherwise.