Skip to main content

Authentication

The Feature Platform uses API Keys to authenticate requests. This ensures that your integration is secure and that your data is protected.

Overview​

Authentication is handled automatically by our SDKs. You simply need to provide the correct API Key when initializing the SDK.

There are two types of API Keys:

  1. Public Keys: Safe to use in client-side applications (browsers, mobile apps). These keys have limited permissions and are primarily used for tracking events and fetching content for display.
  2. Admin Keys: Keep these secret! These keys have full access to your account and should only be used in server-side environments (backend services, scripts).

Using API Keys with the SDK​

Client-Side (Browser)​

When initializing the SDK in a browser environment, use your Public Key.

import { Feature } from '@feature/browser-sdk';

const client = new Feature({
apiKey: 'YOUR_PUBLIC_API_KEY' // Starts with pk_
});

Server-Side (Node.js)​

When using the SDK on your server, use your Admin Key.

import { Feature } from '@feature/node-sdk';

const client = new Feature({
apiKey: 'YOUR_ADMIN_API_KEY' // Starts with sk_
});

[!WARNING] Never expose your Admin Key in client-side code. If an Admin Key is compromised, you must rotate it immediately via the dashboard.

key Management​

You can manage your API Keys in the Settings > API Keys section of the Feature Platform dashboard. From there, you can generate new keys, revoke compromised keys, and view key usage logs.