Keep alive
POST
{{server}}/api/v1/counter/session/keepAliveIf there is no REST communication from the counter to server for a long time, the server will stop the clerk session. To avoid it, you should call the keepAlive endpoint once per minute.
The endpoint has no response, if it was successful.
Request
Authorization
| Header | Value |
|---|---|
Authorization | Bearer {{counterToken}} |
Headers
| Key | Value |
|---|---|
Accept | application/json |
X-WSID | {{counterWsID}} |
Code snippets
- cURL
- JavaScript
- Python
curl -X POST '{{server}}/api/v1/counter/session/keepAlive' \
-H 'Accept: application/json' \
-H 'X-WSID: {{counterWsID}}' \
-H 'Authorization: Bearer {{counterToken}}'
const response = await fetch("{{server}}/api/v1/counter/session/keepAlive", {
method: "POST",
headers: {
"Accept": "application/json",
"X-WSID": "{{counterWsID}}",
"Authorization": "Bearer {{counterToken}}"
},
});
const data = await response.json();
console.log(data);
import requests
url = "{{server}}/api/v1/counter/session/keepAlive"
headers = {
"Accept": "application/json",
"X-WSID": "{{counterWsID}}",
"Authorization": "Bearer {{counterToken}}"
}
response = requests.post(url, headers=headers)
print(response.status_code)
print(response.json())
Example
Example request
POST
{{server}}/api/v1/counter/session/keepAliveHeaders (2)
| Key | Value |
|---|---|
Accept | application/json |
X-WSID | {{counterWsID}} |
Example response 204 No Content
No response body