---
title: "Get login link for user"
method: POST
path: "/public/get-login-link-for-user"
tags: ["User"]
---

# Get login link for user

`POST /public/get-login-link-for-user`

Creates a login link for user for them to login directly into fermion managed LMS. Useful when you have your own system

Authentication with the "FERMION-API-KEY" header is required to use this endpoint.

Rate limit: Maximum 300 requests in a window of 1m.

## Request body

- object
  - `data` object[], required
    - `data` object, required
      - `userIdentifier` union, required
        - object
          - `type` 'email', required
          - `email` string, email, required
        - object
          - `type` 'userId', required
          - `userId` string, required — Internal user ID that you used while creating this user
      - `sessionValidity` '30d' | '60d' | '90d' — Validity of login session user gets. Default is 90 days

## Response `200`

API Response Body

- object[]
  - `output` union, required
    - object
      - `status` 'ok', required
      - `data` object, required
        - `loginUrl` string, uri, required — Direct login URL for Fermion managed LMS for your school. Redirect your user here and they will be logged in directly
    - object
      - `status` 'error', required
      - `errorMessage` string, required

---

[API](https://skmtc.net/fermion/apis/fermion-backend-api.md) · [All operations](https://skmtc.net/fermion/apis/fermion-backend-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/fermion/fermion-backend-api/revisions/7ce364c8820b/schema)
