Skip to content

Authentication

Endpoints related to authentication and authorization

Authenticate with API key to obtain bearer token

Request

Authenticate using your API key to obtain a JWT bearer token for accessing protected endpoints.

Rate Limit: 10 requests / minute

Note: The returned token expires after 30 minutes. You'll need to call this endpoint again to get a new token.

Bodyapplication/jsonrequired
apiKeystringrequired

Your API key obtained from the Admin Settings API page

Example:"your-api-key-here"
curl -i -X POST \
  https://staging.corksy.io/connect-api/v1/v1/auth/public/login \
  -H 'Content-Type: application/json' \
  -d '{
    "apiKey": "your-api-key-here"
  }'

Responses

Authentication successful

Bodyapplication/json
accessTokenstringrequired

JWT bearer token for API access

Example:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_ad
expiresInintegerrequired

Token expiration time in microseconds

Example:1800000
Response
{ "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", "expiresIn": 1800000 }