Authentication
How to generate and use Workspace API Keys to securely authenticate your requests.
The Nyota API uses API keys to authenticate requests. You can view and manage your API keys in the Nyota Accounts Dashboard.
Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, or mobile applications.
Generating an API Key
- Log in to the Nyota Accounts Dashboard.
- Select your target Workspace from the dropdown menu (or remain in your Personal Account).
- Navigate to Identity API & Keys (
/identity-apior/w/[id]/identity-api). - Click Generate Key, provide a logical name (e.g., "Production Next.js Backend"), and select the desired environment.
API Keys are only displayed once upon creation. If you lose your key, you must revoke it and generate a new one.
Using your API Key
All requests to the Nyota API must include your API key in the x-nyota-api-key header.
curl https://backend.nyotaimara.com/v1/drive/files \
-H "x-nyota-api-key: ny_live_abcdef123456_YOUR_SECRET_KEY" \
-H "Content-Type: application/json"If you are using our official SDKs (like @nyota/drive-sdk), simply pass the key during initialization, and the SDK will handle header injection automatically.
import { NyotaDrive } from "@nyota/drive-sdk";
const drive = new NyotaDrive({
apiKey: process.env.NYOTA_API_KEY,
});Application Scoping (Drive Only)
When managing files in Nyota Drive, you can optionally bind API keys to a specific Application. This acts as a security blast radius constraint. If an Application-scoped key is leaked, the attacker will only have access to the files and folders explicitly associated with that Application ID, protecting the rest of your workspace.