How to get an API token and authorization in REST
This guide shows how to login to an application using REST and get an API token to authenticate yourself in the following requests.
Getting the token
To get the token, we will use GpsGate helper tool.
It is also possible to obtain the token using 3rd party tools, but this is not covered in this guide.
1. Go to https://<your server>/comGpsGate/api/v.1/test where <your server> is your server URL. Note that you might have to enter HTTP or HTTPS at the beginning of the URL depending on your server configuration.
2. Go to the Tokens resources part and click on it to expand.
3. Enter the applicationID, username and password and click on Execute.
You will now see your authorization token in the results.
4. Copy/save this authorization key for later use.
Login using the token
1. Go to the top of the URL https://<your server>/comGpsGate/api/v.1/test
2. Click on the top-right button Authorize
3. Paste the token ID generated above and click in Authorize
You will get a confirmation message
Now you're logged into the system and can start using the rest of the resources available.