🇺🇸
Skedway documentation
English (en-us)
English (en-us)
  • Welcome
  • Reference
    • Custom Domain Authentication
  • Automation (API)
    • Check-in through control access
      • Settings
      • Authentication
      • Scheduling
      • Utilities
  • Integrations
    • Integrations - General Specifications
      • Google Workplace Integration - Calendar + Directory
      • Microsoft Integration - Calendar + Directory
    • Importing user`s profile photo
  • SSO - Single Sign On (SAML 2.0)
    • General Specifications
      • SSO for Google Workspace (G-Suite)
      • SSO for Azure portal (Microsoft)
  • Hardwares
    • Network & Infrastructure
    • Access links: URLs allowed to pass through the firewall
Powered by GitBook
On this page
  1. Automation (API)
  2. Check-in through control access

Authentication

Endpoint responsible for authentication and generation of access tokens.

PreviousSettingsNextScheduling

Last updated 2 years ago

Auth

Authentication is performed using the access keys (Client ID and Secret generated via the WEB console), this information must be made available in the Body of the request.

Auth expiration

Access tokens have their expiration time, if the access token is expired, it can be renewed via /auth/refresh-token.

Exemple

{
   "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb21wYW55SWQiOjEsImNsaWVudElkIjoiN2Y2NTlkZjg0MjdlZmZlMWE4Yzk5YzZlZTBmNjM2YTQuc2tlZHdheS5jb20iLCJ0eXBlIjoxLCJpYXQiOjE2Njk5MjI3NzYsImV4cCI6MTY2OTkyNjM3Nn0.g9Lb32ZKGLaDVh2dvGTS4JFjaX56xh2kvC68Kzx2fg8",
   "accessTokenExpiration": 1669926376136,
   "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb21wYW55SWQiOjEsImNsaWVudElkIjoiN2Y2NTlkZjg0MjdlZmZlMWE4Yzk5YzZlZTBmNjM2YTQuc2tlZHdheS5jb20iLCJ0eXBlIjoxLCJpYXQiOjE2Njk5MjI3NzYsImV4cCI6MTY3MDUyNzU3Nn0.4lm_fDOJOxzNJbhKnnCWSqcXXp7CcGInNP2ImiQ1RuU",
   "refreshTokenExpiration": 1670527576136
}

Refresh token

Rquires authentication: Bearer Token (Authorization)

The authentication of this route is performed through the refreshToken generated in the /auth authentication endpoint.

Exemple

{
   "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb21wYW55SWQiOjEsImNsaWVudElkIjoiN2Y2NTlkZjg0MjdlZmZlMWE4Yzk5YzZlZTBmNjM2YTQuc2tlZHdheS5jb20iLCJ0eXBlIjoxLCJpYXQiOjE2Njk5MjI3NzYsImV4cCI6MTY2OTkyNjM3Nn0.g9Lb32ZKGLaDVh2dvGTS4JFjaX56xh2kvC68Kzx2fg8",
   "accessTokenExpiration": 1669926376136,
   "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb21wYW55SWQiOjEsImNsaWVudElkIjoiN2Y2NTlkZjg0MjdlZmZlMWE4Yzk5YzZlZTBmNjM2YTQuc2tlZHdheS5jb20iLCJ0eXBlIjoxLCJpYXQiOjE2Njk5MjI3NzYsImV4cCI6MTY3MDUyNzU3Nn0.4lm_fDOJOxzNJbhKnnCWSqcXXp7CcGInNP2ImiQ1RuU",
   "refreshTokenExpiration": 1670527576136
}

Generate a new access token with refresh token

get
Authorizations
Responses
200
Success, access token refreshed
application/json
401
Unauthorized
404
Not Found
get
GET /auth/refresh-token HTTP/1.1
Host: 
Authorization: Bearer Bearer
Accept: */*
{
  "accessToken": "text",
  "accessTokenExpiration": 1,
  "refreshToken": "text",
  "refreshTokenExpiration": 1
}
  • Auth
  • POSTGenerate access Token with API credentials (Client ID & Secret)
  • Auth expiration
  • Refresh token
  • GETGenerate a new access token with refresh token

Generate access Token with API credentials (Client ID & Secret)

post
Body
clientIdstringRequired

Skedway API Client ID

Example: 9f659df8427effe1a8c99c6ee0f636a4.skedway.com
clientSecretstringRequired

Skedway API Secret ID

Example: 97ca9fd9917c9e6bae10c31e70a2729f50e41a4114772bd2344f420160ce20ee
Responses
201
Success, acess token generated
application/json
401
Unauthorized
403
Invalid credential
404
Not Found
post
POST /auth HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 141

{
  "clientId": "9f659df8427effe1a8c99c6ee0f636a4.skedway.com",
  "clientSecret": "97ca9fd9917c9e6bae10c31e70a2729f50e41a4114772bd2344f420160ce20ee"
}
{
  "accessToken": "text",
  "accessTokenExpiration": 1,
  "refreshToken": "text",
  "refreshTokenExpiration": 1
}