Skip to content
Last updated

Segment integration

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

  • A Segment workspace
  • Access to Settings → Access Management in your Segment workspace to create a Public API token

Connect to Segment

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.

Step 1: Open Tokens

Sign in to Segment, select your workspace, and go to Settings → Access Management → Tokens.

Step 2: Create a Public API token

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

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.

Configure the Frontegg portal

Once you have your Public API token, configure the integration in the Frontegg portal:

  1. Open the Frontegg portal and navigate to [ENVIRONMENT] → Integrations → Segment.
  2. Paste the token into the API Key field.
  3. 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.
  4. 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 levelWhat the integration can do
Workspace OwnerFull read and write access to sources, destinations, warehouses, users, and user groups
Source Admin / Source Read-onlyWrite or read the sources the token is scoped to
Destination Admin / Destination Read-onlyWrite 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

Never share or commit your API token to version control.

Additional resources