GenAcsTok
Connect to the broker, only once this function has returned successfully can any other operations be performed.
Request to be POSTed to uri : /NorenWClientAPI/GenAcsTok
Request Details :
| Parameter Name | Possible value | Description |
|---|---|---|
| jData* | Should send json object with fields in below list |
| Json Fields | Possible value | Description |
|---|---|---|
| code* | Obtained from redirect Url. | |
| checksum* | The combined value of the Client_id, secret code, and code is encrypted using the SHA256. |
Example
curl --location 'https://api.kambala.co.in/NorenWClientAPI/GenAcsTok' \
--header 'Content-Type: text/plain' \
--data 'jData={"code":"4604773e-4ee3-4d48-a920-f31dd6fb4abf","checksum":"3782d63739483f1cff4b14fd22b7acd217c0260d278e0ca05f797797e7ca2fe1"}
Response Details :
| Json Fields | Possible value | Description |
|---|---|---|
| USERID | User ID | |
| access_token | Authorize and authenticate a user or application when accessing protected APIs. | |
| expires_in | Time duration after which the token becomes invalid. | |
| refresh_token | Authentication systems to obtain a new access token without requiring the user to log in again. | |
| scope | Specific permissions or level of access that an access token grants. | |
| actid | Account id | |
| uname | User name | |
| prarr | Json array of Product Obj with enabled products, as defined below. | |
| stat | Ok or Not_Ok | Login Success Or failure status |
| susertoken | It will be present only on login success. This data to be sent in subsequent requests in jKey field and web socket connection while connecting. | |
| uid | UserId | |
| brnchid | Region | |
| orarr | order types allowed/available for the user | |
| exarr | Json array of strings with enabled exchange names | |
| values | Json array of non empty Market watchlists name. | |
| mws | Json array of Market Watchlist scripts. | |
| brkname | Broker id | |
| lastaccesstime | It will be present only on login success. | |
| lastpwdtime | Timestamp of the last time a user’s password was changed. |
Sample Success Response :
{
"USERID": "DEMO",
"access_token": "128d382c02bf1d526529bd54a567bb5bfa53afddc3e0e9ea86529d07f9784b93",
"expires_in": "1772527627",
"refresh_token": "0fb614fdc40c519c0eeedbce10f4d2337332911af48afd351128613e1eeb2034",
"scope": "0",
"actid": "DEMO"
}
Sample Failure Response :
{
"stat": "Not_Ok",
"emsg": "Invalid Input : INVALID_VERIFIER",
"uid": "DEMO"
}