Authentication
The globalMOO API uses API keys for authentication. To access the API, you'll need to include your API key in the authorization header of each request.
API Keys
API keys should be included in the Authorization
header of each request:
Authorization: Bearer your-api-key-here
SDK Authentication
from globalmoo.client import Client
from globalmoo.credentials import Credentials
# Method 1: Using environment variables
client = Client()
# Method 2: Direct credentials
credentials = Credentials(
api_key="your-api-key",
base_uri="https://app.globalmoo.com/api/",
validate_tls=True # Defaults to True, required for globalmoo.ai domains
)
client = Client(credentials=credentials)
Environment Variables
The SDKs support loading credentials from environment variables:
GMOO_API_KEY
: Your API keyGMOO_API_URI
: API base URI (defaults to https://app.globalmoo.com/api/)
TLS Validation
The SDKs validate TLS certificates by default for security. This is required when using official globalmoo.ai domains but can be disabled for testing:
# For local testing with self-signed certificates
credentials = Credentials(
api_key="your-api-key",
base_uri="https://localhost:8443/",
validate_tls=False
)
Security Best Practices
Keep your API key secure and never share it
Use environment variables to store API keys
Rotate API keys periodically
Use different API keys for development and production
Last updated