---
title: "returns user info to caller"
method: GET
path: "/userinfo"
tags: ["authentication"]
---

# returns user info to caller

`GET /userinfo`

## Response `200`

user is logged in and a JSON is returned with the userinfo

- UserInfo
  - `logged_in` boolean, required
  - `subject` string
  - `profile` string
  - `email` string
  - `roles` string[]
  - `preferred_username` string
  - `name` string
  - `family_name` string
  - `given_name` string
  - `expires_at` string, date-time

## Other responses

- `400` — when auth is disabled, an error 400 is sent with a message
- `500` — internal server error

## Changes

> 50 revisions in range; 3 not diffed.

- **2025-01-31** `59ee4da76dd0` — 1 info
  - added the non-success response with the status `400`
- **2025-01-31** `89e14302a637` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/swissopenem/apis/scicat-ingestor-api/changes/userinfo/get.md)

---

[API](https://skmtc.dev/swissopenem/apis/scicat-ingestor-api.md) · [All operations](https://skmtc.dev/swissopenem/apis/scicat-ingestor-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/swissopenem/scicat-ingestor-api/revisions/f35bb454d121/schema)
