---
title: "Unlock session"
method: POST
path: "/api/v2/user/unlock"
tags: ["User"]
---

# Unlock session

`POST /api/v2/user/unlock`

Unlocks the current user session, enabling operations that require
an unlocked token, such as sending a transaction. Call this endpoint
if an API returns a `401` response with the `needsUnlock`
body parameter set to `true`.

**Note:** Unlocking a token with spending limits, removes all spending limits from the token.

## Request body

- UnlockRequest
  - `duration` integer — Number of seconds that the session will stay unlocked
  - `otp` string — Second factor authentication token

## Response `200`

OK

- object
  - `session` Session1
    - `created` string, date-time, required
    - `expires` string, date-time, required
    - `id` string, required
    - `ip` string, ipv4
    - `ipRestrict` string[] — IP addresses or CIDR block of clients that are allowed to use this token
    - `origin` string, required — BitGo environment that issued this token
    - `scope` string[], required
    - `unlock` Unlock1
      - `time` string, date-time
      - `expires` string, date-time
      - `txCount` integer
      - `txValue` integer
      - `txValueLimit` number
      - `spendingLimits` SpendingLimits
    - `user` string, required

---

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