Login

Get token API

This API provides the functionality to obtain opaque token from authorization_code exchange and also provides the user’s profile in the same response.

post/v2/login/authorization/token

Request

  • Base URL: https://api-v2.upstox.com
  • URL: https://api-v2.upstox.com/v2/login/authorization/token
  • Auth: none declared

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.