Authentication

Validate your access token

In order to know if the access token you have is valid you can perform a GET against the following url:

SMEasy API validate url

https://integrationapi.smeasy.co.za/validate

With the following request header:

  • Authorization: Bearer <ACCESS_TOKEN>

Where ACCESS_TOKEN is your access token.

If the access token is valid you will receive the following json along with a 200 HTTP status code.

{
    "subject": "<SMEASY_COMPANY_ID>\\<SMEASY_USER_ID>",
    "name": "<COMPANY_NAME>\\<USERNAME>",
    "scopes": "read offline_access",
    "client": "<CLIENT_ID>"
}

Where:

  • SMEASY_COMPANY_ID is the SMEasy company Id.
  • SMEASY_USER_ID is the SMEasy user Id.
  • COMPANY_NAME is the SMEasy Company Name.
  • USERNAME is the SMEasy user username.
  • CLIENT_ID is the Client Id provided to you when you listed your application with SMEasy support.

If the access token is invalid because it has expired or because it is corrupted or simply not a valid access token you will receive a 401 HTTP status code.

Previous
How to authenticate