Skip to content
Get started
DOCUMENTATION
⚑ Quick Start Guide

Step 2: Authenticate Your Requests

The Scenario API uses Basic Authentication with your API Key and API Secret.

Use your API Key and API Secret, joined by a colon and Base64-encoded.

1. Combine Key and Secret:
YOUR_API_KEY:YOUR_API_SECRET

2. Base64 Encode the Combined String:
For example, if YOUR_API_KEY is hello and YOUR_API_SECRET is world, the combined string is hello:world. The Base64 encoding of hello:world is aGVsbG86d29ybGQ=.

3. Construct the Authorization Header:
Authorization: Basic aGVsbG86d29ybGQ=

import Scenario from '@scenario-labs/sdk';
const client = new Scenario({
apiKey: 'YOUR_API_KEY',
apiSecret: 'YOUR_API_SECRET',
});
const { teams } = await client.teams.list();
console.log(teams);