Auth Service Calls
Authenticate Keysβ
π£οΈ Endpoint Summaryβ
| Property | Value |
|---|---|
| Name | AuthenticateKeys |
| Method | POST |
| URL | <protocol>://<host name>:<service port>/<service name>/<tenantid>/v1/authenticateKeys |
| Description | Validate application API keys and retrieve a session token. |
When to use this
Call this endpoint first to exchange your apiKey and secretKey for a shortβlived sessionKey. Include the returned sessionKey in the Authorization header for all subsequent API calls.
π Request Parametersβ
| Parameter | Type | Required | Description |
|---|---|---|---|
apiKey | string | Yes | API key provided by SynapseWave. |
secretKey | string | Yes | Secret key provided by SynapseWave. |
π€ Example request bodyβ
{
"apiKey": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJDdXN0b21lcklkIjoiLTEiLCJuTm9kZUxpY2Vuc2VFeHBp cnkiOiIxMjI3ODk5MDYxMjAiLCJpYXQiOjE1NjYyOTIwMTB9.u353xX2lq01_rrz3MpzPnjAxsiXraHuVUTWXEeQEcw",
"secretKey": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJDdXN0b21lcklkIjoiLTEiLCJuTm9kZUxpY2Vuc2VFeHBp cnkiOiIxMjI3ODk5MDYxMjAiLCJpYXQiOjE1NjYyOTIwNjB9.xB10HrKuNthwZ1bVeR5HH9pC9rLQT4Y9x9FGPh2V7uo"
}
π’ Successful Response Fieldsβ
The ResponseObject contains the following fields:
| Field | Type | Description |
|---|---|---|
| status | boolean | true if the session key was generated; false if any error occurred. |
| errorCode | string | Error code if any error occurred. |
| errorString | string | Humanβreadable error description. |
| sessionKey | string | Generated session key to be passed in the Authorization header of every subsequent API request. |
β Example (Success)β
{
"status": true,
"errorCode": "",
"errorString": "",
"sessionKey": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcGlLZXkiOnsiQ3VzdG9tZXJJZCI6Ii0xIiwibk5vZGVM aWNlbnNlRXhwaXJ5IjoiMTIyNzg5OTA2MTIwIiwiaWF0IjoxNTY2MjkyMDEwfSwic2VjcmV0S2V5Ijp7IkN1c3 RvbWVySWQiOiItMSIsIm5Ob2RlTGljZW5zZUV4cGlyySI6IjEyMjc4OTkwNjEyMCIsImlhdCI6MTU2NjI5MjA2MH0sImhvc3RuYW1lIjoiRlRDUFUzMzQ0IiwiZXhwIjoxMDk1NjUzODIsImlhdCI6MTU2NjMwMjYzM30.QDasu_icyKo5ngd57d-rWLYokUNM8eQXROPu56YtLso"
}
β Example (Invalid Credentials)β
{
"status": false,
"errorCode": "500",
"errorString": "Invalid API key / Secret key",
"sessionKey": ""
}
β³ Example (Token Expired)β
{
"status": false,
"errorCode": "500",
"errorString": "TokenExpiredError: jwt expired",
"sessionKey": ""
}