---
title: "Authenticates a user and creates a new user session."
method: POST
path: "/authentication"
tags: ["Authentication"]
---

# Authenticates a user and creates a new user session.

`POST /authentication`

## Request

- The document declares no server URL.
- Auth: API key in header `Authorization`

Create New User

## Headers

- `X-GD-RequestId` string, required

## Request body

- AuthenticationRequest: Represents a request to authenticate a user. Contains grant type, scope, and authorization header for authentication.
  - `grant_type` string, nullable: The OAuth grant type (e.g., "password", "client_credentials").
  - `scope` string, nullable: The requested scope for the authentication (e.g., "openid profile").

## Response `200`

OK

- AuthenticationResponse: Represents the response returned after a successful authentication. Contains access token, token type, expiration, and scope.
  - `access_token` string, nullable: The access token issued to the client.
  - `token_type` string, nullable: The type of token issued (e.g., "Bearer").
  - `expires_in` integer, nullable: The lifetime in seconds of the access token.
  - `scope` string, nullable: The scope of the access token.
  - `responseDetails` ResponseDetail[], nullable: Required: A list of response details providing status codes, descriptions, and additional information about the result of the operation.
    - `code` integer: The primary status or error code for the response (e.g., 200 for success, 400 for validation error).
    - `subCode` integer, nullable: An optional subcode providing more granular detail about the response or error.
    - `description` string, nullable: A human-readable description of the response, error, or status.
    - `url` string, nullable: A URL linking to documentation or a web page with more information about the response code.

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `500`: Internal Server Error
- `503`: Service Unavailable

## Changes

- **2026-11-03** `28aa54bed51e`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/greendot/apis/baas-apis/changes/authentication/post.md)

---

[API](https://skmtc.dev/greendot/apis/baas-apis.md) - [All operations](https://skmtc.dev/greendot/apis/baas-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/greendot/apis/baas-apis/revisions/28aa54bed51e?raw)
