Environments
Macrofy provides separate environments for development and production use.
Base URLs
- Name
Production- Type
- https://api.macrofy.com
- Description
Live environment for production traffic.
- Name
Development- Type
- https://api.dev.macrofy.com
- Description
Sandbox for testing and development. Data may be reset periodically.
API keys
Each environment requires its own API key. You can generate keys from the Macrofy dashboard.
- Production keys start with
mk_live_ - Development keys start with
mk_test_
Never use production keys in development or commit them to source control. Use environment variables to manage keys safely.
Environment variables
# Development
MACROFY_API_KEY=mk_test_abc123...
MACROFY_BASE_URL=https://api.dev.macrofy.com
# Production
MACROFY_API_KEY=mk_live_xyz789...
MACROFY_BASE_URL=https://api.macrofy.com
SDK configuration
import { MacrofyClient } from '@macrofy/node'
const macrofy = new MacrofyClient({
apiKey: process.env.MACROFY_API_KEY,
baseUrl: process.env.MACROFY_BASE_URL, // Optional, defaults to production
})