---
title: "Creates an user session."
method: POST
path: "/session"
tags: ["Sessions"]
---

# Creates an user session.

`POST /session`

Creates an user session.

## Examples

    POST /session.json

## Request body

- SessionCreateBodyRequest — Request to create session
  - `application_id` integer, required — Application ID
  - `auth_key` string, required — Authorization Key
  - `keys` object
    - `secret` string — Social network provider access token secret
    - `token` string — Social network provider access token
  - `nonce` integer, required — Unique Random Value
  - `provider` string — Social network provider name
  - `signature` string, required — HMAC-SHA function of the body of the request with a key auth_secret
  - `timestamp` integer, required — Unix Timestamp
  - `user` object
    - `email` string, email — Email address
    - `login` string — User login
    - `password` string, password — User password

## Response `201`

Session

- SessionResponse — Response schema for success request
  - `session` Session — User session entity
    - `_id` integer — Session identifier
    - `application_id` integer — Application identifier
    - `created_at` string, date-time — Creation timestamp
    - `id` string — Session identifier
    - `nonce` integer — Unique random value
    - `token` string — Authorization token
    - `ts` integer — Unix timestamp
    - `updated_at` string, date-time — Update timestamp
    - `user_id` integer — User identifier

## Other responses

- `400` — Bad params
- `401` — Unauthorized response
- `422` — Unprocessable entity response

---

[API](https://skmtc.net/quickblox/apis/quickblox-clients-api.md) · [All operations](https://skmtc.net/quickblox/apis/quickblox-clients-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/quickblox/quickblox-clients-api/revisions/86fda89a7d6a/schema)
