latestOpenAPI 3.0.32026-08-224982,0272.8 MB

e445c15e5bee

User

Login

Creates a short-lived (1 hour) access token for use with the API. Requires a verified email address. BitGo doesn't recommend using this endpoint for scripting. Instead, use the SDK or the web UI to create long-lived access tokens. However, short-lived access tokens are the only access tokens with the "user_manage" scope that enables you to programmatically add users to your enterprise using the Add User to Enterprise endpoint.

post/api/v2/user/login

Request body

emailstring email required

The verified email address of the user

extensibleboolean

"true" if the session is extensible beyond a one-hour duration

otpstring required

Second factor authentication token.

passwordstring required

Example request

{
  "email": "user@email.com",
  "otp": "123456",
  "password": "secret"
}

Response

OK

access_tokenstring
derivationPathstring
encryptedECDHXprvstring
encryptedTokenstring
expires_atnumber required

Unix timestamp

expires_innumber required
noECDHKeychainboolean
scopestring[] required
token_idstring

The public ID of the access token — used as the bearer token for v4 auth

token_typestring required
grant_type'password' | 'passkey' | 'refresh_token' | 'authorization_code' | 'oauth' required
warningstring
sourceVerificationTypestring

How the request source was verified during login.

twoFactorMethodstring

The two-factor authentication method used during login.

ssoProviderstring

The SSO provider used for login, when applicable.

Example response

{
  "access_token": "9b72c68ef394f5146f0f3efc1feafb7a971752cb00e79fafcfd8c1d2db83639c",
  "expires_at": 1534201288,
  "scope": [
    "crypto_compare",
    "user_manage",
    "openid",
    "profile",
    "wallet_create",
    "wallet_manage_all",
    "wallet_approve_all",
    "wallet_spend_all",
    "wallet_edit_all",
    "wallet_view_all"
  ],
  "user": {
    "organizations": [
      {
        "role": "admin"
      }
    ],
    "phone": {
      "phone": "408-718-6885",
      "verified": true
    },
    "country": "USA",
    "freezeReason": "Frozen due to suspicious activity",
    "state": "New York",
    "id": "59cd72485007a239fb00282ed480da1f",
    "username": "user@email.com",
    "name": {
      "first": "Jane",
      "full": "Jane Doe",
      "last": "Doe"
    },
    "email": {
      "email": "user@email.com",
      "verified": true
    }
  },
  "sourceVerificationType": "trust-my-device",
  "twoFactorMethod": "totp",
  "ssoProvider": "google"
}