Create Network Session(s)
Create network (admin) session identified by email & password, requires use of API key (Header: X-Casambi-Key).
note
- Network session works only with network credentials. If you have site user credentials then you should use user session instead.
- After 3 failed logins user has to wait one minute to try to login again. When trying to login during this wait time server will respond with status code: Forbidden 403.
HTTP Request:
POST https://door.casambi.com/v1/networks/session
Request Body:
{
"email": "name@address.com",
"password": "password"
}
CURL Example:
curl -X POST "https://door.casambi.com/v1/networks/session" \
-H "Content-Type: application/json" \
-H "X-Casambi-Key:API-KEY-HERE" \
-d "{\"email\":\"EMAIL-HERE\",\"password\":\"PASSWORD-HERE\"}"
Response Example
{
"VcrTwqLZJ26UYMXxTClmpfZxELcrPUAa": {
"id": "VcrTwqLZJ26UYMXxTClmpfZxELcrPUAa",
"address": "a00f251f77aa",
"name": "Dev Network",
"type": "OPEN",
"grade": "EVOLUTION",
"sessionId": "KDRmwOqerOsTyrr0x9HLrGFe1nknEk3oRoT-Kz3DJ.wx97MTXQXC.ZbWwqt9ze0KwC6h3GCTlPsUemX8uvK5Ow__"
}
}
note
Notice the "sessionId" and "id" (networkId) within response data. These both are needed in almost all further API requests.