Avatar

how we get session id

0
Rohit Isshu

Please sign in to leave a comment.

1 comment

0
Avatar

While it is tempting to simply “hard code” the application to point to a particular server, such as my20.geotab.com, this is the incorrect approach. Over the course of time a database is not guaranteed to remain on the same server. It is common for load balancing to occur and resources to be transferred from one server to another as necessary. To prevent the application from losing its connection to the correct database, authentication calls must be made to the root federation server instead of making the request to a particular server.

As an example; making an authentication call to “my.geotab.com” and authentication occurring. Such a call could be made as:

/* The following JavaScript example shows how to call Authenticate. Just fill in your details for each of the parameters. */
api.call("Authenticate", {
"userName":"",
"database":"",
"password":""
});

Where the database, user and password are set by you.

If however if a Session ID is require, it can be retrieved by

  1. Log in to the MyGeotab database using your credentials
  2. Open up Developer Tools within the browser (F12 shortcut on the keyboard)
  3. Click Network
    1. If this section is empty, refresh the page to reload the data
  4. Click on any of the apiv1 files within the Name panel
  5. Within the Headers tab, scroll down to the Form Data section
  6. Within the JSON object listed in JSON-RPC, find the part of the JSON which lists "credentials"
  7. The current session ID is listed in the "credentials" object
Ana Salehi 0 votes