--- title: "Quick Start Guide" slug: "quick-start-guide" description: "Build with Narmi’s Public API using SDK or sandbox setup, OAuth credentials, signed JWT validation, access tokens, and NodeJS authentication examples." tags: ["OAuth Authentication", "Sandbox Environment"] status: "new" updated: 2026-12-01T22:41:58Z published: 2026-12-01T22:41:58Z canonical: "help.narmi.com/quick-start-guide" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.narmi.com/llms.txt > Use this file to discover all available pages before exploring further. # Quick Start Guide Here's a brief guide to help you get started building with our Public API. For any questions or if you need assistance, feel free to reach out to us at [support@narmi.com](http://mailto:support@narmi.com). ## SDK Setup for the Public API We offer a Software Development Kit (SDK) for the Public API to help with development. To get started, request `testuser` login credentials as well as OAuth application credentials from [support@narmi.com](http://mailto:support@narmi.com). Go to [Public API SDK](/apihome/apidocs/public-api-sdk) for detailed instructions. ## Non-SDK Setup for the Public API To get started building with the Public API, you'll need access to our sandbox environment. Our sandbox environment for Online Banking is [https://online.sandbox.narmi.dev/](https://online.sandbox.narmi.dev/). Please email us at [sandbox@narmi.com](http://mailto:sandbox@narmi.com) to request access. ### What Is the Sandbox? The production environment is where you launch your custom functionality. The sandbox environment is a replica of our production environment and supports the same API endpoints. Applications should be tested against the sandbox environment before being used in production. For account opening endpoints, please use your financial institution’s user acceptance testing (UAT) environment, as access to a test core banking system is needed. Contact [support@narmi.com](http://mailto:support@narmi.com) for setup. It's important to note the following differences between the sandbox environment and the production environment: - The sandbox contains only test data and is completely separate from your production account. - All API endpoints use the sandbox base URL ([https://api.sandbox.narmi.dev/v1/](https://api.sandbox.narmi.dev/v1/)), not a production URL. - Actual money is not sent or received as part of test transactions. - Transfers may not create corresponding transactions; they remain pending indefinitely. *Note: Real financial data and personal data (such as Social Security Numbers) should never be used in the sandbox.* The sandbox is shared by other Narmi customers, so it is not an isolated test environment. If you are a third-party vendor and require testing in a specific financial institution’s UAT environment with their test core, please contact them to get access. ### Access to the Sandbox Once you request access from [sandbox@narmi.com](http://mailto:sandbox@narmi.com), our team will respond with the following information: - Your sandbox test account login credentials - The Client ID of your Narmi Application Framework (NAF) application. This is not treated as sensitive and is often visible in URLs or static configuration. - The Client Secret (Shared Secret) of your NAF application. This is a cryptographically secure character string. It is treated as sensitive and only used for secure server-to-server communication. - The URL of your NAF app. This is the URL that the app will use to redirect/authenticate users. With this information, you can begin making calls to the Public API. ## Understanding App Launch When your NAF app is loaded on Narmi's platform, an HTTP POST request is made to your specified NAF app URL. This POST request will contain some parameters in the body, including the signed_request parameter, which you should decode for user information, and a signature to verify the security and authenticity of this data. The signed_request is base64 encoded and signed with an SHA256 HMAC of your Client Secret, sometimes referred to as a JSON Web Token (JWT). You can parse this parameter like this: 1. Split the signed request into three parts delineated by a `.` character, for example, `34k324nsfsfm.238fsdfsd.oijdoifjsidf899`. 2. Calculate the expected signature of the request, and compare it to the third part—the encoded signature. 3. If the expected signature and signature match, decode the second part—the payload—from base64 and then decode the resultant JSON object. This JSON object has [several keys](https://datatracker.ietf.org/doc/html/rfc7519#section-4.1): | Name | Type | Description | Example | | --- | --- | --- | --- | | exp | number | expiration, a Unix epoch timestamp | `1716239322` | | iat | number | issued at, a Unix epoch timestamp | `1716239022` | | aud | string | client ID of the application | `7ugpYTwyIoFkhz6bLnzQJGYUEaJGtcnrv8pfOJCb` | | sub | string | subject, the Narmi user ID | `0b0b893f-9885-4789-b26d-6e879f0fc693` | | user.institution_user_identifier | string | uniquely identifies the current user on the core | `555555` | | user.institution_business_identifier | string | uniquely identifies the current user's business on the core (if any). Is not the EIN | `555556` | | user.narmi_business_identifier | string | UUID, uniquely identifies the business to Narmi | `823686a9-6412-4a3e-b1bc-79371702f7fb` | *Note: If the current time is later than `exp`, the request should be considered invalid. Narmi issues tokens that expire five minutes after they’re created, so if your server’s clock may drift, consider allowing a small tolerance when checking `exp`.* ## Make Calls to the Public API Once you have a valid Sandbox account, you can start making calls to the Public API. To do this: 1. Log into Narmi at [https://online.sandbox.narmi.dev](https://online.sandbox.narmi.dev). 2. Select your app name from the right side of the page, or select **Tools**, then select your app name. 3. A POST request is made to the Redirect URI with an auth code in the URL parameters. To get the user’s UUID, first verify the signed request as shown in [Validate Signed JWT](/apihome/apidocs/quick-start-guide#example-code-for-auth-nodejs), then read the `sub` key from the decoded payload. 4. You will exchange the code, scope, Client ID, and Client Secret for an access token and secret specific to the user (see example curl below). 5. The access token can be used to query the user's data. Refer to Public API Access for more information. ``` curl -X POST https://api.sandbox.narmi.dev/v1/tokens -H 'Content-Type: application/json' -d '{"grant_type": "authorization_code", "code": "INSERT_HERE", "scope": "read write read:profile write:preferences", "client_id": "INSERT_HERE", "client_secret": "INSERT_HERE"}' ``` ## Example Code for Auth (NodeJS) All imports can be completed with NodeJS built-ins, meaning this example requires no additional dependencies. Narmi will provide the environment information as part of your initial [setup](/apihome/apidocs/quick-start-guide#sdk-setup-for-the-public-api). This includes the Client ID, Client Secret, and API Root. ``` const crypto = require('crypto'); const { Buffer } = require('buffer'); const https = require('https'); const clientSecret = "Client Secret"; const clientId = "Client ID"; const apiRoot = "API Domain"; ``` The following code snippet lays the groundwork for making http requests. ``` async function requestSync(url, options, postBody) { return new Promise((resolve, reject) => { const req = https.request(url, options, (res) => { res.setEncoding('utf8'); let responseBody = ''; res.on('data', (chunk) => { responseBody += chunk; }); res.on('end', () => { resolve(responseBody); }); }).on('error', (err) => { reject(err); }); if(postBody) { req.write(postBody); } req.end(); }); } ``` When a NAF Client receives a request from Narmi, the first thing it should do is verify that it was signed by the same Client Secret that the NAF Client is using. This allows the Client to verify the sender's identity and provides information about the sender. If the signature doesn’t match or the token has expired, reject the request and don’t use any data from the payload. ``` function validateSignedRequest(requestBody) { const decodedBody = Buffer.from(requestBody, 'base64').toString('ascii'); const requestParts = decodedBody.split("&")[0].split("=")[1].split('.'); if (requestParts.length !== 3) { return null; } const signedMessage = `${requestParts[0]}.${requestParts[1]}`; const expectedSig = crypto.createHmac('sha256', clientSecret).update(signedMessage).digest(); const receivedSig = Buffer.from(requestParts[2], 'base64url'); // If the signature doesn't match, reject the request. Don't decode or use the payload. if (receivedSig.length !== expectedSig.length || !crypto.timingSafeEqual(receivedSig, expectedSig)) { console.log("failed to validate signed jwt"); return null; } const payload = JSON.parse(Buffer.from(requestParts[1], 'base64url').toString('utf8')); // If the current time is later than exp, reject the request if (Math.floor(Date.now() / 1000) > payload.exp) { console.log("signed jwt has expired"); return null; } return payload; } const payload = validateSignedRequest(requestBody); if (!payload) { // Reject the request (for example, respond with 401) and stop here } ``` After the request sender's identity is verified, use the authorization code—passed either in the request body or querystring parameter—to obtain an access token. This token will be limited to querying Narmi for the user that authorized access. ``` const tokenRequest = { "grant_type": "authorization_code", "code": code, "scope": "read write read:profile write:preferences", "client_id": clientId, "client_secret": clientSecret }; const response = requestSync(`${apiRoot}/v1/tokens`, { headers: { "Content-Type": "application/json", "User-Agent": "company_name-application_name" }, method: "POST" }, JSON.stringify(tokenRequest)); const responseBody = await response; const responseObj = JSON.parse(responseBody); ``` Using the token and secret obtained from the step above, you can now make requests against the Public API on behalf of the user who authorized access. A full list of endpoints can be found under the Public API category. ``` async function getAPI(endpoint, token, secret) { const date = new Date(Date.now()).toISOString(); const signature = crypto.createHmac('sha256', secret).update(`date: ${date}`).digest('base64'); const sigHeader = `keyId="${token}",algorithm="hmac-sha256",signature="${signature}",headers="date"`; const requestHeaders = { "Authorization": `Bearer ${token}`, "date": date, 'Content-Type': 'text/javascript', "Signature": sigHeader, "User-Agent": "company_name-application_name" }; const response = requestSync(`${apiRoot}${endpoint}`, { headers: requestHeaders, method: "GET" }); const responseBody = await response; let responseObj; try { responseObj = JSON.parse(responseBody); } catch (error) { console.log(error); } return responseObj; } ``` ## Related - [Public API SDK](/public-api-sdk.md) - [Public API Overview](/public-api-overview.md)