Loading...

Authentication

To give an application access to the Plaspy REST API, send your username and API key. Plaspy returns an access token (JWT) that is valid for 24 hours.

For example, a delivery application can send the token in the Authorization header to retrieve the device list. The team can then select a vehicle by name and the application can use its identifier for a look-up.

Request details

POST /api/Auth/Token

Send a JSON request body over HTTPS. You can find your username in My Account . If you need a key, see how to enable the API.

Request parameters

ParameterTypeRequiredDescription
userNameStringRequiredStringYesUsername of the account that generated the key.
apiKeyStringRequiredStringYesAPI key generated in My Account.

Example request

For {api-host}, use the HTTPS host listed in the REST API reference. Replace the other values in braces with those for your integration.

POST /api/Auth/Token HTTP/1.1 Host: {api-host} Content-Type: application/json { "userName": "{userName}", "apiKey": "{apiKey}" }

Response fields

FieldTypePresenceDescription
successBooleanIn the responseBooleanIn the responsetrue indicates that the operation succeeded.
tokenStringOn successStringOn successToken to send with authenticated requests.
expiresDate-timeOn successDate-timeOn successDate and time when the token expires, in UTC.
errorCodeIntegerOn errorIntegerOn errorNumeric authentication error code.
errorTextStringOn errorStringOn errorMessage explaining why the request was rejected.

Example HTTP 200 response

{ "success": true, "token": "{token}", "expires": "2030-01-15T12:00:00Z" }

Use the token in a request

Copy the value of token after Bearer, separated by a space. You can reuse it until the time in expires. To obtain another token, repeat the request with your current credentials.

GET /api/devices HTTP/1.1 Host: {api-host} Authorization: Bearer {token}

Errors

For HTTP 400, check that the body contains both required fields. For HTTP 401, check the username and API key for that account. For HTTP 500, try again later.

Example HTTP 401 response

{ "success": false, "errorCode": 1, "errorText": "Invalid username or API key." }
Index
Questions?

We answer all support request within 24 business hours approximately, If you have a question that needs an immediate resolution, please contact us by other way.

We answer you in business hours, as soon as possible. We are located in Bogotá, Colombia, time zone (GMT-5).

Last modification: 2026-11-30 11:46:03