Authentication
Credentials
Section titled “Credentials”Every SDK requires three identifiers to authenticate with the API:
| Header | Field | Description |
|---|---|---|
X-PROJECT-ID | projectId | Your project identifier |
X-AGENT-ID | agentId | The agent (app/service) identifier |
X-ENVIRONMENT-ID | environmentId | The environment identifier |
These are sent as HTTP headers on every request to the API.
Getting Your Credentials
Section titled “Getting Your Credentials”- Log in to flags.gg
- Navigate to your project
- Select the agent and environment
- Copy the IDs from the settings panel
SDK Usage
Section titled “SDK Usage”Every SDK accepts auth credentials during client initialization:
// Goclient := flags.NewClient( flags.WithAuth(flags.Auth{ ProjectID: "your-project-id", AgentID: "your-agent-id", EnvironmentID: "your-environment-id", }),)# Pythonclient = new_client( project_id="your-project-id", agent_id="your-agent-id", environment_id="your-environment-id",)// React / Next.js<FlagsProvider options={{ projectId: "your-project-id", agentId: "your-agent-id", environmentId: "your-environment-id",}}>See individual SDK pages for the complete setup.
Security
Section titled “Security”- Credentials identify which flags to serve — they do not grant write access
- Use different environment IDs for production, staging, and development
- Never commit credentials to version control; use environment variables or secret managers