---
title: "Sign in with API key"
method: POST
path: "/v1/{organization}/user/signin_with_api_key"
tags: ["User"]
---

# Sign in with API key

`POST /v1/{organization}/user/signin_with_api_key`

Given an organization API key, issue an authorization token for the specified user. The token should then be attached to the `Authorization` header in subsequent Amigo API calls.

This is an alternative authorization method for users who cannot use the Amigo frontend to login and authenticate.

## Path parameters

- `organization` string, required

## Headers

- `x-api-key` string, required — The value of the API key.
- `x-api-key-id` string, required — The ID of the API key.
- `x-user-id` string, required — The ID of the user to sign in as.
- `x-mongo-cluster-name` string, nullable — The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.
- `Sec-WebSocket-Protocol` string[]

## Response `200`

Succeeded.

- SrcAppEndpointsUserSignInWithApiKeyResponse
  - `id_token` string, required — The ID token that should be attached to the Authorization header for future API calls.
  - `expires_at` string, date-time, required — The time at which the token expires.

## Other responses

- `401` — API key not found, is incorrect, or the requested user is not found.
- `404` — Specified organization is not found.
- `422` — Invalid request path parameter failed validation.
- `429` — The user has exceeded the rate limit of 5 requests per minute for this endpoint.
- `503` — The service is going through temporary maintenance.

---

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