- Overview
- Key Access Levels
- Basic Authentication Overview
- HMAC Authentication Overview
- SDKs
- Calven Data Models
- HMAC Authentication
- Presence
- Occupancy
- Time off
- Access Credentials
- Warehouse - Basic Auth
- Warehouse - HMAC Auth
Generate a token with an API key and HMAC
POST
/v1/auth
auth
Request
Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.Example:
Authorization: Bearer ********************
Body Params application/json
apiKey
string
required
timestamp
number
required
Example:
1711062317
hash
string
required
The HMAC-SHA256 hash generated from the string +timestamp using the api key secret
Example
{
"apiKey": "string",
"timestamp": 1711062317,
"hash": "string"
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.calven.com/v1/auth' \
--header 'Content-Type: application/json' \
--data-raw '{
"apiKey": "string",
"timestamp": 1711062317,
"hash": "string"
}'
Responses
🟢200Success
application/json
Body
authenticated
boolean
required
message
string
required
token
string
required
expiration
number
required
Example
{
"authenticated": true,
"message": "string",
"token": "string",
"expiration": 0
}
🟠400400
🟠401Payload when auth header is missing or invalid