Skip to main content

SDK Authentication

Step 1: Create a Credential for the Integration

  1. Create an API credential from tenant settings.
  2. Scope it to the minimum resources required.
  3. Record integration owner and expiration policy.

Step 2: Store Credential in a Secret Manager

Use environment injection in each deployment environment.

CHYPER_API_BASE=https://your-api-base
CHYPER_API_KEY=your-api-key

Step 3: Initialize Authenticated Client

import { ChyperClient } from "@chyper/sdk";

export const client = new ChyperClient({
baseURL: process.env.CHYPER_API_BASE,
accessToken: process.env.CHYPER_API_KEY,
});

Step 4: Verify Credential Scope

await client.projects.list();

If access fails, verify credential scope and active status.

Step 5: Rotate Without Downtime

  1. Create new credential.
  2. Deploy with both old and new credential support window.
  3. Confirm successful traffic with new credential.
  4. Revoke old credential.

Security Rules

  • Never expose credentials in browser bundles.
  • Never log raw credentials.
  • Separate credentials by environment and workload.