Skip to content

User Details

This sections let’s us know how to fetch the information of the logged in user.


POST: /apiV2/userDetails

https://connect.thefirstock.com/apiV2/userDetails

Request Details

Parameter Description
userId User Id of the login user
jKey Token Received from Login API

Code

curl --X POST 'https://connect.thefirstock.com/apiV2/userDetails' \
--H 'Content-Type: application/json' \
--d '{
    "userId": "",
    "jKey": ""
}'
from thefirstock import thefirstock

userDetails = thefirstock.firstock_userDetails()
const Firstock = require('thefirstock');

const firstock = new Firstock();

firstock.getUserDetails((err, result)=>{
    console.log("Error, ",err)
    console.log("Result: ",result)
})
using thefirstock;

class Program
{
public static void Main()
{
    Firstock firstock = new Firstock();
    var userDetails = firstock.getUserDetails();
}
}

Success Response Details

Parameter Description
data.requestTime Response received time.
Status Success
data.userName Name given to the user during registration.
data.exchange Json array of strings with enabled, allowed exchange names
data.orarr Json array of Product Obj with enabled products, as defined below.
data.uprev Always it will be an INVESTOR, other types of user not allowed to login using this API.
data.stat Ok
data.email E-mail given by the user

Failure Response Details

Parameter Description
Status Failed
data Type of error
{
"Status": "Success",
"data": {
    "requestTime": "16:47:03 01-09-2022",
    "userName": "*******",
    "exchange": [
        "NSE",
        "BSE",
        "NIPO"
    ],
    "orarr": [
        "LMT",
        "MKT",
        "SL-LMT",
        "SL-MKT"
    ],
    "email": "*******",
    "actid": "******",
    "uprev": "INVESTOR",
}
{
  "Status": "Failed",
  "data": "Invalid Input :  Invalid App Key"
}