GET
/
med-assist
/
session
/
{session_id}
/
refresh
curl --location --request GET 'https://api.eka.care/med-assist/session/a349a41e-5d49-488a-b300-66ccbfdf16b3/refresh' \
--header 'x-agent-id: <agent-id>' \
--header 'x-sess-token: <old_token>'
{
  "session_id": "a349a41e-5d49-488a-b300-66ccbfdf16b3",
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "expires_at": "2024-01-01T14:00:00Z"
}
curl --location --request GET 'https://api.eka.care/med-assist/session/a349a41e-5d49-488a-b300-66ccbfdf16b3/refresh' \
--header 'x-agent-id: <agent-id>' \
--header 'x-sess-token: <old_token>'

When to Use

Use this endpoint when your session token has expired but you want to continue the medical consultation. The refresh endpoint allows you to extend the session lifetime without creating a new session.

Next Steps

After refreshing the token, use the new session_token to:
  1. Update your WebSocket authentication
  2. Continue the medical conversation seamlessly
  3. The session ID remains the same, only the token is renewed
For WebSocket implementation details, see the WebSocket documentation.

Authorizations

x-agent-id
string
header
required

Your API key for authentication

Headers

x-sess-token
string
required

The expired session token

Path Parameters

session_id
string<uuid>
required

The unique session identifier

Response

Token refreshed successfully

The response is of type object.