Overview
The Stack Overflow connector works with public stackoverflow.com content, private Stack Overflow for Teams content, and Stack Overflow Enterprise.
How each mode is set up:
- Public stackoverflow.com: No authentication is required. Set
stackoverflow.tagsWhiteListin the Glean Admin console so Glean knows which tags to crawl (see Public site setup). - Stack Overflow for Teams: Authentication uses an access token from explicit OAuth 2.0.
- Stack Overflow Enterprise: Authentication uses the API key from your Enterprise instance in the Glean Admin console (see Enterprise setup).
On the setup page, Glean only crawls questions that contain all of the listed tags (logical AND). For example, java;spring crawls questions tagged with both java and spring.
Glean reads user access permissions in Stack Overflow and enforces them at query time, so users cannot see search results for content they cannot access in Stack Overflow.
All indexed data is stored in a GCP project in your organization’s cloud account. No data leaves your environment.
Integration features
Glean currently indexes the following:
- Questions and answers
API usage
Glean uses the Stack Exchange API documentation to ingest data.
Public site setup
- In the Glean Admin console, set
stackoverflow.tagsWhiteListto a semicolon-separated list of tags to crawl (tag allowlist).
Enterprise setup
- In the Glean Admin console, add your instance API key as
STACKOVERFLOW_API_KEY. - Set
stackoverflow.useApiKeytotrue. - Set
stackoverflow.apiKeyDomainto your Enterprise domain.
Stack Overflow for Teams setup
Retrieve your team ID
- In Stack Overflow, go to Admin Settings → Display Settings.
- Find your Team URL. It uses the form
https://stackoverflow.com/c/{TEAM_ID}. - Save the
TEAM_IDvalue for the steps below.
Generate a personal access token (PAT)
- Open Global account settings.
- Open Personal access tokens, then click Create a new PAT.
- Use the following values:
- PAT description:
Glean Search Crawler - Team scope: The team that matches your
TEAM_ID - Expiration date: No expiration (recommended to avoid service interruptions)
- Enable write access: Leave unchecked
- PAT description:
- Click Create, then copy the token value.
Connect to Glean
In the Glean Admin console, enter:
- Personal access token: The PAT you created in Stack Overflow
- Team ID: The
TEAM_IDfrom Retrieve your team ID - Allowlisted tags (optional): A semicolon-separated list of tags to restrict the crawl
If you leave Allowlisted tags empty, Glean crawls all tags by default. If you list multiple tags, only questions that include all of those tags are included (AND logic).