---
title: "Generate a new session"
method: POST
path: "/v4/auth/session"
tags: ["Auth"]
---

# Generate a new session

`POST /v4/auth/session`

Generate a short-lived session token used initialize a Slope.js flow on behalf of a customer, skipping the need for the customer to login.

## Headers

- `Slope-Access-Token` string, required

## Response `201`

- SessionTokenV4ResponseDto
  - `sessionToken` string, required — The short-lived session token to use to initialize a Slope.js flow. Pass this token in the `sessionToken` parameter. Expires after 4 hours.
  - `expiresAt` string, date-time, required — The expiration date of the session token.

## Other responses

- `400` — Returned when improperly formatted or missing fields in request body
- `401` — Returned when improper keys or headers are used in the request
- `403` — Returned when the caller is not authorized to access the resource
- `500` — Returned when an internal server error occurs

---

[API](https://skmtc.net/slopepay/apis/slope-v4-api.md) · [All operations](https://skmtc.net/slopepay/apis/slope-v4-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/slopepay/slope-v4-api/revisions/cbdbc861073b/schema)
