Segment is a customer data platform (CDP) that collects, cleans, and routes event data to other tools. Integrating Segment with Frontegg lets your application read and manage your sources and destinations, and read your workspace, warehouses, users and user groups, on behalf of your users — all through Frontegg's integration layer (Segment Public API). Segment's Public API authenticates with a static API token sent on every request, so there is no OAuth flow.
Prerequisites
Prerequisites
- A Segment workspace
- Access to Settings → Access Management in your Segment workspace to create a Public API token
Segment authenticates Public API requests with a static token, sent on every request as the Authorization: Bearer <token> header. The token's access is determined by the permissions you grant it when you create it.
Sign in to Segment, select your workspace, and go to Settings → Access Management → Tokens.
Click + Create Token and select Public API token (not a Config API token). Give it a description, for example Frontegg Integration, and grant it the access it needs — either Workspace Owner for full access, or a member role scoped to the resources you want to manage (see the scopes table below). Create the token.
Copy your token now
Copy your token now
The token is shown only once, when it is created. Copy it immediately and store it securely — treat it like a password. If it is exposed or lost, delete it and create a new one on the same Tokens page.
Once you have your Public API token, configure the integration in the Frontegg portal:
- Open the Frontegg portal and navigate to [ENVIRONMENT] → Integrations → Segment.
- Paste the token into the API Key field.
- Set Data residency region to match your Segment workspace — US (the default) or EU. Segment serves EU-resident workspaces on a separate host, so an EU workspace configured as US will fail to connect.
- Click Save.
The token's permissions determine what the integration can do. Grant the token a role that covers the resources you want to work with:
| Access level | What the integration can do |
|---|---|
| Workspace Owner | Full read and write access to sources, destinations, warehouses, users, and user groups |
| Source Admin / Source Read-only | Write or read the sources the token is scoped to |
| Destination Admin / Destination Read-only | Write or read the destinations the token is scoped to |
Roles can be scoped to specific sources or destinations (optionally via labels) when you create the token. Reading workspace users and user groups requires a workspace-level role.
Keep your credentials secure
Keep your credentials secure
Never share or commit your API token to version control.