On this page
This is the handshake that turns a successful browser login into a token your program can use. It is the only call that does not need a token already, because it is the call that gives you one.
https://api.infinn.in/NorenWClientAPI/GenAcsTok- Method
- POST
- Authentication
- No token needed
- Content-Type
- text/plain
- Body
- jData=<json>
- Returns
- JSON object
- Rate limit
- 20 orders/sec, 200/min (account-wide)
What it does
This is the handshake that turns a successful browser login into a token your program can use. It is the only call that does not need a token already, because it is the call that gives you one.
Exchanges the one-time login code for an access token.
Each login code works exactly once. If the call fails for any reason -- including a mistyped checksum -- you must log in again to get a fresh code. Reusing a spent code returns INVALID_VERIFIER.
The checksum exists so that your secret key never travels. Compute it on a server or in a local script. A secret key embedded in a mobile app or a web page can be extracted by anyone who downloads it.
This is the only way to log in to the INFINN API. If the response contains susertoken, ignore it: it is not used for login or for authorising requests. Use access_token as Authorization: Bearer <token>.
An access token stays valid until the daily server restart (start of day) at about 4:00 AM IST. Logging in again issues a new token and the old one stops working. To renew, run the OAuth login again.
Request
Send a POST with the header Content-Type: text/plain. The body is a single form field, jData, whose value is a JSON string. No Authorization header is needed for this endpoint. See how requests are shaped if that sounds unfamiliar.
Headers
| Header | Type | Description |
|---|---|---|
| Content-Type | string |
|
jData fields
| Field | Type | Description |
|---|---|---|
| code | string | The one-time code returned on the login redirect URL. A single-use code the login page hands back to you. Example 7a1c0e52-90b4-4f3d-a6e8-5d2c4b1f0a93Where to get itThe ?code= query parameter on the URL you land on after signing in at api.infinn.in/OAuthlogin/investor-entry-level/login. 36 characters with dashes. Works once. |
| checksum | string | SHA-256 hash of app_key + secret_key + code, concatenated with no separators and no spaces. A fingerprint that proves you know your secret key without sending it. Example a6cc7cae4ee02398ece3598cb850a4a22599feba08a663995ed58d1341330848Where to get itThe calculator further down this page computes it in your browser, or compute it yourself: if app key is IN001_U, secret key is demo-secret-0000 and code is 7a1c0e52-90b4-4f3d-a6e8-5d2c4b1f0a93, hash the string IN001_Udemo-secret-00007a1c0e52-90b4-4f3d-a6e8-5d2c4b1f0a93. |
Request and response together
The same call, shown as raw HTTP on the left and the documented response on the right.
POST /NorenWClientAPI/GenAcsTok HTTP/1.1
Host: api.infinn.in
Content-Type: text/plain
jData={"code":"7a1c0e52-90b4-4f3d-a6e8-5d2c4b1f0a93","checksum":"a6cc7cae4ee02398ece3598cb850a4a22599feba08a663995ed58d1341330848"}{
"stat": "Ok",
"uid": "IN001",
"USERID": "IN001",
"actid": "IN001",
"uname": "DEMO USER",
"brkname": "INFINN",
"brnchid": "HO",
"access_token": "a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f90",
"susertoken": "a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f90",
"refresh_token": "0f1e2d3c4b5a69788796a5b4c3d2e1f00f1e2d3c4b5a69788796a5b4c3d2e1f0",
"expires_in": "1792022400",
"scope": "...",
"totp_set": "...",
"lastaccesstime": "1792000000",
"lastpwdtime": "...",
"exarr": [
"NSE",
"BSE",
"NFO"
],
"exch_prd": [
"..."
],
"orarr": [
"LMT",
"MKT",
"SL-LMT",
"SL-MKT"
],
"prarr": [
"..."
],
"mws": {},
"values": []
}A failure, for comparison
Note the HTTP status: it is still 200. The failure is reported inside the body. See the two error layers.
POST /NorenWClientAPI/GenAcsTok HTTP/1.1
Host: api.infinn.in
Content-Type: text/plain
jData={"code":"7a1c0e52-90b4-4f3d-a6e8-5d2c4b1f0a93","checksum":"a6cc7cae4ee02398ece3598cb850a4a22599feba08a663995ed58d1341330848"}{
"stat": "Not_Ok",
"emsg": "Invalid Input : INVALID_VERIFIER",
"uid": "TEST"
}Code examples
Each sample is a complete, runnable program. Replace YOUR_ACCESS_TOKEN and the placeholder field values, and it will run as-is. Every one checks both error layers.
curl --request POST \
--url 'https://api.infinn.in/NorenWClientAPI/GenAcsTok' \
--header 'Content-Type: text/plain' \
--data 'jData={"code":"7a1c0e52-90b4-4f3d-a6e8-5d2c4b1f0a93","checksum":"a6cc7cae4ee02398ece3598cb850a4a22599feba08a663995ed58d1341330848"}'"""Generate Access Token
Requires: pip install requests
"""
import json
import requests
URL = "https://api.infinn.in/NorenWClientAPI/GenAcsTok"
payload = {
"code": "7a1c0e52-90b4-4f3d-a6e8-5d2c4b1f0a93",
"checksum": "a6cc7cae4ee02398ece3598cb850a4a22599feba08a663995ed58d1341330848"
}
response = requests.post(
URL,
headers={
"Content-Type": "text/plain",
},
# The body is a form field named jData whose value is a JSON string.
data="jData=" + json.dumps(payload),
timeout=10,
)
# Layer 1: transport. A rejected token or an unregistered IP gives a
# an error with an EMPTY body, so calling .json() first would raise a
# decode error that hides the real cause.
if response.status_code != 200:
raise SystemExit(
f"HTTP {response.status_code}. "
"If 403: check the token, and that this machine's public IP "
"is the one registered on your Infinn profile."
)
data = response.json()
# Layer 2: HTTP 200 does not mean success. Always check stat.
if data.get("stat") != "Ok":
raise RuntimeError(data.get("emsg", "request failed"))
print(json.dumps(data, indent=2))// Generate Access Token
// Runs on Node 18+ (global fetch) and in the browser.
const URL = 'https://api.infinn.in/NorenWClientAPI/GenAcsTok';
const payload = {
"code": "7a1c0e52-90b4-4f3d-a6e8-5d2c4b1f0a93",
"checksum": "a6cc7cae4ee02398ece3598cb850a4a22599feba08a663995ed58d1341330848"
};
async function main() {
const response = await fetch(URL, {
method: 'POST',
headers: {
'Content-Type': 'text/plain',
},
// jData is a form field; its value is a JSON string.
body: 'jData=' + JSON.stringify(payload),
});
// Layer 1: transport. A rejected token or an unregistered IP
// gives an error with an EMPTY body, so parsing first would throw a
// misleading JSON error instead.
if (!response.ok) {
throw new Error(
`HTTP ${response.status}. If 403: check the token, and that `
+ `this machine's public IP is registered on your profile.`,
);
}
const data = await response.json();
// Layer 2: HTTP 200 does not mean success.
if (data.stat !== 'Ok') throw new Error(data.emsg || 'request failed');
console.log(JSON.stringify(data, null, 2));
}
main().catch((err) => console.error('Request failed:', err.message));// Generate Access Token
// .NET 6 or later.
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
class Program
{
const string Url = "https://api.infinn.in/NorenWClientAPI/GenAcsTok";
static async Task Main()
{
var payload = new Dictionary<string, string>
{
["code"] = "7a1c0e52-90b4-4f3d-a6e8-5d2c4b1f0a93",
["checksum"] = "a6cc7cae4ee02398ece3598cb850a4a22599feba08a663995ed58d1341330848"
};
var body = "jData=" + JsonSerializer.Serialize(payload);
using var client = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Post, Url);
request.Content = new StringContent(body, Encoding.UTF8, "text/plain");
using var response = await client.SendAsync(request);
var text = await response.Content.ReadAsStringAsync();
// Layer 1: an error arrives with an empty body.
if (!response.IsSuccessStatusCode)
{
throw new Exception($"HTTP {(int)response.StatusCode}");
}
// Layer 2: inspect stat / emsg in the payload.
Console.WriteLine(text);
}
}// Generate Access Token
// Java 11 or later -- java.net.http is in the JDK, no dependencies.
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class InfinnExample {
private static final String URL = "https://api.infinn.in/NorenWClientAPI/GenAcsTok";
public static void main(String[] args) throws Exception {
String body = "jData={\"code\":\"7a1c0e52-90b4-4f3d-a6e8-5d2c4b1f0a93\",\"checksum\":\"a6cc7cae4ee02398ece3598cb850a4a22599feba08a663995ed58d1341330848\"}";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(URL))
.header("Content-Type", "text/plain")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
// Layer 1: transport status. error responses have an empty body.
if (response.statusCode() != 200) {
throw new RuntimeException("HTTP " + response.statusCode());
}
// Layer 2: check stat / emsg in the JSON payload.
System.out.println(response.body());
}
}<?php
// Generate Access Token
// PHP 7.4 or later, with the cURL extension.
$url = 'https://api.infinn.in/NorenWClientAPI/GenAcsTok';
$payload = [
'code' => '7a1c0e52-90b4-4f3d-a6e8-5d2c4b1f0a93',
'checksum' => 'a6cc7cae4ee02398ece3598cb850a4a22599feba08a663995ed58d1341330848',
];
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 10,
CURLOPT_HTTPHEADER => [
'Content-Type: text/plain',
],
// jData is a form field whose value is a JSON string.
CURLOPT_POSTFIELDS => 'jData=' . json_encode($payload),
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
// Layer 1: transport. Error responses have an empty body.
if ($status !== 200) {
throw new RuntimeException("HTTP {$status}");
}
// Layer 2: inspect stat / emsg.
$data = json_decode($body, true);
print_r($data);Checksum calculator
The checksum field is a SHA-256 hash, so it cannot be typed. Compute it here and copy it into your own request - the three values never leave this page.
This calculator is plain JavaScript running in your own tab. It makes no network request of any kind, and the values are not saved. You can confirm that: open devtools, Network tab, and watch nothing happen.
The same is not true of the online SHA-256 tools a search will offer you. A secret key pasted into one of those is a secret key you no longer control. If you would rather not type it here either, the command-line versions do the same arithmetic locally.
Not your user ID.
Never sent, never stored.
36 characters with dashes. Single use.
Fill in all three fields aboveResponse
On success the body is a JSON object. Infinn omits fields rather than returning null, so check that a field is present before reading it. The field list below matches a live success response (16 Oct 2026).
| Field | Type | Description |
|---|---|---|
| stat | string | Ok on success, Not_Ok on failure. Always check this before reading anything else. Did it work? Ok means yes, Not_Ok means no. |
| access_token | string | The token to send as a Bearer credential on every other call. 64 hexadecimal characters, no dashes. Your temporary password for the API. |
| refresh_token | string | Refresh token. Present in the live response. No refresh endpoint is documented yet; log in again after expiry. |
| expires_in | string | When the access token expires, as a Unix timestamp in seconds. |
| uname | string | User name. |
| actid | string | Account ID. For an individual account it equals |
| uid | string | User ID, in capitals. Both |
| USERID | string | User ID (same value as |
| susertoken | string | Session token. Currently the same value as |
| brnchid | string | Branch ID. |
| exarr | string | Exchanges enabled for the account (list). |
| exch_prd | string | Products enabled per exchange (list). |
| orarr | string | Order types enabled (list). |
| prarr | string | Products enabled (list). |
| mws | string | Market watch scripts. |
| values | string | Market watch names (list). |
| lastpwdtime | string | Last password change time. |
| scope | string | Token scope. |
| totp_set | string | Whether TOTP is set up for the user. |
| brkname | string | Broker ID. |
| lastaccesstime | string | Previous access time, as a Unix timestamp. |
| emsg | string | Human-readable reason for the failure. If something went wrong, this says what. PresencePresent only when stat is Not_Ok. |
Errors
This endpoint can fail at either layer. A transport failure returns a 4xx or 5xx with an empty body; an application failure returns 200 with stat: "Not_Ok" and an emsg.