API access authorization

Symmetrical implements OAuth 2.0 to allow access to Payroll API without exposing their credentials with each new session.
The Client has to obtain JWT token from Symmetrical Authentication server using provided client-id and client-secret.

  1. The Client requests access and refresh token from the Auth server. Request body should contain client-id and client-secret provided by Symmetrical.
  2. If credentials are correct the Auth server responds with access_token. Note that the access token is valid for limited time. When the token expires the Client should perform access token refresh.
  3. With valid access token in the Authorization header access to Payroll API is granted.

Authentication procedure:


Request example:

Auth serverhttps://sso.symmetrical.ai/
CURL - Authenticationcurl --location --request POST '{{url}}:{{port}}/auth/realms/dashboard/protocol/openid-connect/token'
--header 'Content-Type: application/x-www-form-urlencoded'
--data-urlencode 'grant_type=client_credentials'
--data-urlencode 'client_secret=clientsecret'
--data-urlencode 'client_id=clientaccountid'
CURL – Refreshcurl --location -g --request POST '{{url}}:{{port}}/auth/realms/payroll/protocol/openid-connect/token'
--header 'Content-Type: application/x-www-form-urlencoded'
-d "grant_type=refresh_token&client_id=access&refresh_token=<refresh_token>"