latestOpenAPI 3.0.32026-08-224982,0272.8 MB

e445c15e5bee

User

Unlock session

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.

post/api/v2/user/unlock

Request body

durationinteger

Number of seconds that the session will stay unlocked

otpstring

Second factor authentication token

Example request

{
  "otp": "123456"
}

Response

OK

Example response

{
  "session": {
    "id": "59cd72485007a239fb00282ed480da1f",
    "ip": "127.0.0.1",
    "origin": "test.bitgo.com",
    "scope": [
      "crypto_compare",
      "user_manage",
      "openid",
      "profile",
      "wallet_create",
      "wallet_manage_all",
      "wallet_approve_all",
      "wallet_spend_all",
      "wallet_edit_all",
      "wallet_view_all"
    ],
    "unlock": {
      "spendingLimits": {
        "btc": {
          "txCount": 1,
          "txValue": 0,
          "txValueLimit": 100000000
        },
        "eth": {
          "txCount": 1,
          "txValue": 0,
          "txValueLimit": 50000000000
        }
      }
    },
    "user": "59cd72485007a239fb00282ed480da1f"
  }
}