---
title: "POST /ver2/AuthenticationService.svc/sessions/long"
method: POST
path: "/ver2/AuthenticationService.svc/sessions/long"
tags: ["Authentication"]
---

# POST /ver2/AuthenticationService.svc/sessions/long

`POST /ver2/AuthenticationService.svc/sessions/long`

## Request

- Base URL: `https://api.enviance.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.enviance.com/ver2/AuthenticationService.svc/sessions/long`
- Auth: none declared
- TypeScript: <https://skmtc.dev/enviance/apis/restapi/docs/ver2/AuthenticationService.svc/sessions/long/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates long-living session from current (source session). It does not close source session, so user still in source session (getCurrentSession() should return same value).
Second call of createLongLivingSession() should reuse longSession if it already exists.
**Security:** All users.

**SDK API:**  `envianceSdk.authentication.createLongLivingSession(onsuccess, onerror)`  
null


envianceSdk.authentication.createLongLivingSession
```
[
  "onsuccess",
  "onerror"
]
```

## Headers

- `EnvApi-Systemid` string
- `EnvApi-Packageid` string
- `EnvApi-Udf-DateTime-Iso-In-CustomFields` string
- `EnvApi-Udf-DateTime-ReadInUserTz` string
- `EnvApi-Udf-Value-Invariant` string
- `EnvApi-Localization-All` string
- `x-client-request-id` string

## Response `default`

not available

- string, guid

---

[API](https://skmtc.dev/enviance/apis/restapi.md) - [All operations](https://skmtc.dev/enviance/apis/restapi/llms.txt) - [OpenAPI document](https://skmtc.dev/enviance/apis/restapi/revisions/45b2200a8cf2?raw)
