Login

Generate token using TOTP and PIN

This API generates an access token for an automation client using the app's API key together with the user's 6-digit PIN and 6-digit TOTP

post/v2/totp-login/authorization/token

Request

  • Base URL: https://api-v2.upstox.com
  • URL: https://api-v2.upstox.com/v2/totp-login/authorization/token
  • Auth: none declared. Required headers: x-api-key

Headers

x-api-keystring required
Example:api_key

OAuth API key that identifies the app

Request body

pinstring required

The 6-digit PIN configured by the user

totpstring required

The 6-digit TOTP from the user's authenticator app

Response

Successful

emailstring

E-mail address of the user

exchangesstring[]

Lists the exchanges to which the user has access

productsstring[]

Lists the products types to which the user has access

brokerstring

The broker ID

user_idstring

Uniquely identifies the user

user_namestring

Name of the user

order_typesstring[]

Order types enabled for the user

user_typestring

Identifies the user's registered role at the broker. This will be individual for all retail users

poaboolean

To depict if the user has given power of attorney for transactions

ddpiboolean

Indicates if DDPI is enabled for trading

is_activeboolean

Whether the status of account is active or not

access_tokenstring

The authentication token that is to used with every subsequent API requests

extended_tokenstring

An extended authentication token with a prolonged validity period, intended for specific API requests. Ensure you use this token only with the designated set of APIs.

expires_ininteger

The number of seconds until the access token expires

token_typestring

The type of token

refresh_tokenstring

The refresh token that can be used to refresh the access token

refresh_token_expires_ininteger

The number of seconds until the refresh token expires

Example response

{
  "email": "client@email.com",
  "broker": "UPSTOX",
  "user_name": "client",
  "user_type": "individual",
  "poa": true,
  "ddpi": true,
  "is_active": true
}

Changes

No recorded changes to this operation across all 1 revision of this API.