user

Create or retrieve API token for a user.

Handles both:

  • Users authenticating with basic credentials to get a token
  • Two-factor authentication flow
post/user/token/

Request

  • Base URL
    https://api.cloudsmith.io
  • Auth
    HTTP basic

Request body

emailstring email

Email address to authenticate with

passwordstring

Password to authenticate with

totp_tokenstring

Two-factor authentication code

Response

Retrieved/created user API token/key.

tokenstring

API token for the authenticated user

two_factor_requiredboolean

Flag indicating whether a 2FA code is required to complete authentication

two_factor_tokenstring

Token to use when providing 2FA code

Changes

No recorded changes to this operation across all 6 revisions of this API.