---
title: "Generate login link"
method: POST
path: "/users/login-link"
tags: ["Users"]
---

# Generate login link

`POST /users/login-link`

Generate a login link for a user. The link contains a custom Firebase token that allows the user to authenticate directly.

**Requirements:**
- User must have been created via API (`from: 'api'`)
- User must belong to the billing account making the request

If requirements are not met, returns a 404 error.

**gigstack Connect:** Generate login links for other teams' users using the `team` parameter.

## Query parameters

- `team` string

## Request body

- object
  - `user_id` string, required — The Firebase UID of the user

## Response `200`

Login link generated successfully

- object
  - `data` object
    - `login_link` string — The login URL with embedded token
    - `valid_until` number — Unix timestamp (ms) when the token expires (1 hour from generation)
    - `method` 'token' — The authentication method used
  - `message` string

## Other responses

- `404` — User not found or not accessible via API

---

[API](https://skmtc.net/disruptive-learning/apis/gigstack-api-v2.md) · [All operations](https://skmtc.net/disruptive-learning/apis/gigstack-api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/disruptive-learning/gigstack-api-v2/versions/5cf53ffd7580/schema)
