---
title: "Sign in with a code"
method: POST
path: "/auth/otp/sign-in"
tags: ["OTP"]
---

# Sign in with a code

`POST /auth/otp/sign-in`

## Request body

- object
  - `code` string, required — A 45-character verification code. For magic links, this is the code found in the "code" URL query parameter. For OTP, this is formed by concatenating the 6-digit code entered by the user with the nonce (received during code creation)

## Response `200`

Successful response

- object
  - `refresh_token` string, required — Long-lived refresh token that can be used to obtain a new access token
  - `access_token` string, required — Short-lived access token that can be used to authenticate the user
  - `is_new_user` boolean, required — Whether the user is a new user
  - `user_id` string, required — The unique identifier of the user

---

[API](https://skmtc.net/hexclave/apis/hexclave-rest-api-3.md) · [All operations](https://skmtc.net/hexclave/apis/hexclave-rest-api-3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hexclave/hexclave-rest-api-3/versions/690014f63028/schema)
