Server Environment Quickstart
This guide will help you set up your server environment to work with Openfort, including getting your API keys and configuring the necessary SDKs for backend operations.
Get your API keys
Before you begin, go to the Openfort Dashboard and select your desired project from the dropdown at the top. Then, navigate to the API Keys tab for your app. Then grab your secret key.
Server SDKs
These libraries include helpful utilities around verifying access tokens issued by Openfort and interacting with Openfort's API to query and import users, create wallets, verify webhooks, and more.
You can visit the SDK reference documentation to learn more about the available SDKs and how to use them in your server-side application.
Node.js
Add @openfort/openfort-node to your project
npm install @openfort/openfort-nodeDeclare Openfort Environment Variables
After your project is ready, grab your secret_key from the project settings.
Create a .env file and populate it with your project's secret key.
YOUR_SECRET_KEY=sk_test_...Initialize Openfort in your project
import Openfort from '@openfort/openfort-node';
const openfort = new Openfort(process.env.OPENFORT_SECRET_KEY);
export default openfort;Using .Net
If you are using .NET, you can use the Openfort .NET SDK.
using Openfort.SDK;
using Openfort.SDK.Model;
const openfort = new OpenfortClient(YOUR_SECRET_KEY);Using the REST API
You can visit the API reference documentation to learn more.
For example, in a JavaScript fetch request, your headers should look like:
fetch('https://api.openfort.io/v1/some-endpoint', {
method: 'GET',
headers: {
'Authorization': `Bearer sk_test_...`,
}
});