| name | flexport-install-auth |
| description | Install and configure Flexport API authentication with API keys or OAuth credentials.
Use when setting up a new Flexport logistics integration, configuring bearer tokens,
or initializing the Flexport REST API client for shipment and supply chain operations.
Trigger: "install flexport", "setup flexport", "flexport auth", "flexport API key".
|
| allowed-tools | Read, Write, Edit, Bash(npm:*), Bash(curl:*), Grep |
| version | 1.6.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","logistics","flexport"] |
| compatibility | Designed for Claude Code |
Flexport Install & Auth
Overview
Configure Flexport API authentication for logistics and supply chain integration. Flexport offers two auth methods: API Keys (simple bearer tokens that never expire) and API Credentials (client ID/secret pairs that issue JWTs valid for 24 hours). The v2 REST API base URL is https://api.flexport.com and speaks JSON.
Prerequisites
- Flexport account at flexport.com
- API key or credentials from Flexport Portal > Settings > Developer > API Credentials
- Node.js 18+ or Python 3.9+
Instructions
Step 1: Obtain API Credentials
Navigate to Flexport Portal > Settings > Developer. Two options:
| Auth Method | Format | Lifetime | Use Case |
|---|
| API Key | Bearer token string | Permanent | Simple integrations, scripts |
| API Credentials | Client ID + Secret | JWT, 24h | Production apps, rotating tokens |
Step 2: Configure Environment Variables
FLEXPORT_API_KEY=your_api_key_here
FLEXPORT_CLIENT_ID=your_client_id
FLEXPORT_CLIENT_SECRET=your_client_secret
FLEXPORT_API_URL=https://api.flexport.com
Step 3: Authenticate with API Key
const FLEXPORT_BASE = 'https://api.flexport.com';
async function flexportRequest(path: string, options: RequestInit = {}) {
const res = await fetch(`${FLEXPORT_BASE}${path}`, {
...options,
headers: {
: ,
: ,
: ,
...options.,
},
});
(!res.) ();
res.();
}