Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/four-paws-raise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"soteams-sdk-docs": patch
"@stackoverflow/teams-sdk": patch
---

Leftover changes from the update in naming conventions to Stack Overflow Internal
6 changes: 6 additions & 0 deletions .changeset/huge-breads-design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"soteams-sdk-docs": minor
"@stackoverflow/teams-sdk": minor
---

Changed naming conventions from "Stack Overflow for Teams" and "Stack Overflow Enterprise" to "Stack Overflow Internal" and "Stack Internal Enterprise"
5 changes: 5 additions & 0 deletions .changeset/tired-papers-sleep.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"soteams-sdk-docs": minor
---

Changed site URL to sdk.stackoverflow.help
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Stack Overflow for Teams SDK
# Stack Overflow Internal SDK

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](./LICENSE)
![Status: Early Access](https://img.shields.io/badge/status-early--access-orange)

> Official TypeScript SDK for interacting with the **Stack Overflow for Teams API**.
> Official TypeScript SDK for interacting with the **Stack Overflow Internal API**.

The Stack Overflow for Teams SDK lets you build powerful applications and integrations on top of your team’s private knowledge base.
The Stack Internal SDK lets you build powerful applications and integrations on top of your team’s private knowledge base.

---

## ✨ Features

- 🛠 **Official support** – built and maintained by Stack Overflow with full API coverage.
- 🧑‍💻 **Type safety** – complete TypeScript definitions for all Teams endpoints, models, and responses.
- 🧑‍💻 **Type safety** – complete TypeScript definitions for all Stack Internal endpoints, models, and responses.
- 📚 **Knowledge access** – query questions, answers, and articles from your team’s private repository.
- 👥 **Team management** – access profiles, activity, and collaborate on internal documentation and Q&A.

Expand Down Expand Up @@ -40,7 +40,7 @@ yarn add @stackoverflow/teams-sdk

## 📚 Documentation

* [Quick Start Guide](https://sdk.stackoverflowteams.com/)
* [Quick Start Guide](https://sdk.stackoverflow.help/)
* [API v3 Overview](https://stackoverflowteams.help/en/articles/9085836-api-v3-overview)

## 🛠 Contributing
Expand All @@ -51,6 +51,6 @@ Contributions are welcome! Please open an [issue](https://github.com/StackExchan

(C) Copyright 2025 Stack Exchange, Inc.

This Stack Overflow for Teams SDK is licensed to you under the terms of the Apache Software License Version 2.0 (Apache 2.0): https://www.apache.org/licenses/LICENSE-2.0.txt
This Stack Overflow Internal SDK is licensed to you under the terms of the Apache Software License Version 2.0 (Apache 2.0): https://www.apache.org/licenses/LICENSE-2.0.txt

The Teams SDK is 100% open source and freely available to download and use under the terms of the Apache 2.0 license. This SDK enables development with the Stack Overflow for Teams API, which is available to all Teams customers, but may be subject to future changes.
The Stack Overflow Internal SDK is 100% open source and freely available to download and use under the terms of the Apache 2.0 license. This SDK enables development with the Stack Internal API, which is available to all Stack Internal customers, but may be subject to future changes.
4 changes: 2 additions & 2 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import starlight from '@astrojs/starlight';

// https://astro.build/config
export default defineConfig({
site: 'https://sdk.stackoverflowteams.com',
site: 'https://sdk.stackoverflow.help',
integrations: [
starlight({
favicon: '/favicon.ico',
title: 'Stack Overflow for Teams SDK',
title: 'Stack Overflow Internal SDK',
editLink: {
baseUrl: 'https://github.com/StackExchange/StackOverflowSDK/edit/main/docs',
},
Expand Down
12 changes: 6 additions & 6 deletions docs/src/content/docs/guides/authentication.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ description: Learn how to authenticate with the Stack Overflow API using the bui
---
import { Card, CardGrid } from '@astrojs/starlight/components';

The Stack Overflow SDK provides built-in authentication helpers that simplify the OAuth 2.0 flow with PKCE for secure token generation. Authentication requirements vary by Stack Overflow for Teams tier.
The Stack Overflow SDK provides built-in authentication helpers that simplify the OAuth 2.0 flow with PKCE for secure token generation. Authentication requirements vary by Stack Internal tier.

### Authentication by Tier

- **Stack Overflow for Teams Enterprise** - Supports OAuth 2.0 with PKCE. Access tokens can be generated dynamically. You can optionally provide a single Access Token manually.
- **Stack Overflow for Teams Basic/Business** - OAuth is not available. Manual input of Access tokens (PATs) are **required** in order to use the SDK.
- **Stack Internal Enterprise** - Supports OAuth 2.0 with PKCE. Access tokens can be generated dynamically. You can optionally provide a single Access Token manually.
- **Stack Internal Basic/Business** - OAuth is not available. Manual input of Access tokens (PATs) are **required** in order to use the SDK.

### Authentication Clients

Expand Down Expand Up @@ -66,7 +66,7 @@ const questions = await teamContext.questions.getAll();
## Authentication Clients (Enterprise Only)

:::note[Enterprise Feature]
Authentication clients are only available for Stack Overflow for Teams Enterprise instances. Basic/Business tiers must use Personal Access Tokens during SDK initialization.
Authentication clients are only available for Stack Internal Enterprise instances. Basic/Business tiers must use Personal Access Tokens during SDK initialization.
:::

### Backend Authentication (Server-Side)
Expand Down Expand Up @@ -132,11 +132,11 @@ const success = await frontendClient.submitAccessToken(userToken);

```typescript
interface AuthConfig {
/** OAuth client ID from Stack Overflow Enterprise */
/** OAuth client ID from Stack Internal Enterprise */
clientId: string;
/** Redirect URI registered with your application */
redirectUri: string;
/** Stack Overflow Enterprise instance URL */
/** Stack Internal Enterprise instance URL */
baseUrl: string;
/** OAuth scopes (optional) */
scope?: string;
Expand Down
4 changes: 2 additions & 2 deletions docs/src/content/docs/guides/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Get your Stack Overflow integration running in minutes with our JavaScript SDK.

## Authentication Setup

Before making API calls, you'll need to set up authentication. The approach varies by your Stack Overflow for Teams tier:
Before making API calls, you'll need to set up authentication. The approach varies by your Stack Internal tier:

### Enterprise - OAuth Available
Enterprise instances can use built-in OAuth clients or manual tokens:
Expand Down Expand Up @@ -181,7 +181,7 @@ const questions = await sdk.questions.getAll();

## Team Context

For Stack Overflow for Teams, use the team context:
For Stack Internal Basic/Business, use the team context:

```typescript title="team-example.ts"
// Switch to team context
Expand Down
4 changes: 2 additions & 2 deletions docs/src/content/docs/guides/rate-limiting.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: Rate Limiting and Throttling
description: Understanding API throttling and rate limits for Stack Overflow for Teams API v3.
description: Understanding API throttling and rate limits for Stack Overflow Internal API v3.
---

Stack Overflow for Teams API v3 uses request throttling to prevent abuse and ensure optimum performance for all users. We currently implement two different types of throttling to alleviate excessive API calls: burst throttle rate limiter (short-term) and token bucket rate limiter (long-term). Both throttling methods monitor the number of requests coming from each access token.
Stack Overflow Internal API v3 uses request throttling to prevent abuse and ensure optimum performance for all users. We currently implement two different types of throttling to alleviate excessive API calls: burst throttle rate limiter (short-term) and token bucket rate limiter (long-term). Both throttling methods monitor the number of requests coming from each access token.

## Burst Throttle Rate Limiter

Expand Down
22 changes: 11 additions & 11 deletions docs/src/content/docs/index.mdx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
title: Welcome to The Stack Overflow for Teams SDK
description: Build powerful applications with the official Stack Overflow for Teams SDK. Access your team's private knowledge base programmatically.
title: Welcome to The Stack Overflow Internal SDK
description: Build powerful applications with the official Stack Internal SDK. Access your team's private knowledge base programmatically.
template: splash
banner:
content: |
This SDK is currently in <strong>Early Access</strong>. New features are actively being developed.
hero:
tagline: Start building with the Stack Overflow for Teams API using our official SDK
tagline: Start building with the Stack Internal API using our official SDK
image:
light: ../../assets/stackoverflow-black.svg
dark: ../../assets/stackoverflow-white.png
Expand Down Expand Up @@ -39,14 +39,14 @@ import { Card, CardGrid } from '@astrojs/starlight/components';
</Card>
</CardGrid>

## Why use the Stack Overflow for Teams SDK?
## Why use the Stack Internal SDK?

<CardGrid>
<Card title="Official Support" icon="approve-check-circle">
Built and maintained by Stack Overflow with full Teams API coverage and guaranteed compatibility.
Built and maintained by Stack Overflow with full Stack Internal API coverage and guaranteed compatibility.
</Card>
<Card title="Type Safety" icon="laptop">
Complete TypeScript definitions for all Teams endpoints, models, and responses.
Complete TypeScript definitions for all Stack Internal endpoints, models, and responses.
</Card>
<Card title="PKCE Authentication Built-in" icon="approve-check-circle">
Includes full PKCE authentication with ready-to-use helpers for both backend and frontend implementations.
Expand All @@ -55,11 +55,11 @@ import { Card, CardGrid } from '@astrojs/starlight/components';

## Popular use cases

Whether you're building internal tools, integrating with existing workflows, or creating custom team applications, the Stack Overflow for Teams SDK provides everything you need to leverage your team's collective knowledge.
Whether you're building internal tools, integrating with existing workflows, or creating custom team applications, the Stack Overflow Internal SDK provides everything you need to leverage your team's collective knowledge.

**Internal Tooling**: Build IDE extensions, code review tools, or documentation generators that tap into your team's institutional knowledge.

**Workflow Integration**: Connect your Teams instance with CI/CD pipelines, project management tools, or custom dashboards.
**Workflow Integration**: Connect your Stack Internal instance with CI/CD pipelines, project management tools, or custom dashboards.

**Knowledge Management**: Create applications that help organize, surface, and distribute your team's expertise and best practices.

Expand All @@ -72,11 +72,11 @@ This project is in **early access**, and more language support and features will

## Ready to start building?

Our SDK provides a higher-level abstraction for programmatically interacting with Stack Overflow for Teams, removing friction and enabling you to focus on building great experiences for your team.
Our SDK provides a higher-level abstraction for programmatically interacting with Stack Internal, removing friction and enabling you to focus on building great experiences for your team.

## License
(C) Copyright 2025 Stack Exchange, Inc.

This Stack Overflow for Teams SDK is licensed to you under the terms of the Apache Software License Version 2.0 (Apache 2.0): https://www.apache.org/licenses/LICENSE-2.0.txt
This Stack Overflow Internal SDK is licensed to you under the terms of the Apache Software License Version 2.0 (Apache 2.0): https://www.apache.org/licenses/LICENSE-2.0.txt

The Teams SDK is 100% open source and freely available to download and use under the terms of the Apache 2.0 license. This SDK enables development with the Stack Overflow for Teams API, which is available to all Teams customers, but may be subject to future changes.
The Stack Overflow Internal SDK is 100% open source and freely available to download and use under the terms of the Apache 2.0 license. This SDK enables development with the Stack Overflow Internal API, which is available to all Stack Internal customers, but may be subject to future changes.
2 changes: 1 addition & 1 deletion docs/src/content/docs/users/manage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ const managementData = await safeUserManagement({

## Notes

- **Enterprise Only**: This method is only available in enterprise Stack Overflow context, not for Stack Overflow for Teams.
- **Enterprise Only**: This method is only available in enterprise Stack Overflow context, not for Stack Internal Basic/Business.
- **Admin Privileges**: Requires administrator or moderator permissions to access user management data.
- **Extended User Data**: Provides additional fields like creation dates, modification dates, and deactivation status not available in regular user queries.
- **Date Filtering**: Supports sophisticated date-based filtering for activity analysis and user lifecycle management.
Expand Down
8 changes: 4 additions & 4 deletions sdk/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Stack Overflow for Teams SDK
# Stack Overflow Internal SDK

A comprehensive TypeScript/JavaScript SDK for interacting with the Stack Overflow for Teams API. This toolkit provides easy-to-use methods for accessing questions, answers, users, and other resources in your Stack Overflow for Teams instance.
A comprehensive TypeScript/JavaScript SDK for interacting with the Stack Internal API. This toolkit provides easy-to-use methods for accessing questions, answers, users, and other resources in your Stack Internal instance.

## Features

- 🚀 **Simple API wrapper** - Clean, intuitive interface for all Stack Overflow for Teams endpoints
- 🚀 **Simple API wrapper** - Clean, intuitive interface for all Stack Internal endpoints
- 🔒 **OAuth2 authentication** - Built-in support for access token authentication
- 📦 **Modular design** - Organized client modules for different resource types
- 🎯 **Team context support** - Switch between different teams seamlessly
Expand Down Expand Up @@ -101,7 +101,7 @@ interface SDKConfig {

### Authentication

Basic and Business customers can follow the official Stack Overflow for Teams guide to create a Personal Access Token (PAT) for API authentication:
Basic and Business customers can follow the official Stack Internal guide to create a Personal Access Token (PAT) for API authentication:

👉 [Personal Access Tokens (PATs) for API Authentication](https://stackoverflowteams.help/en/articles/10908790-personal-access-tokens-pats-for-api-authentication)

Expand Down
10 changes: 5 additions & 5 deletions sdk/src/auth/backend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ import { AuthConfig, TokenResponse, PKCETokens } from './types.js';
import crypto from 'crypto';

/**
* Backend authentication client for Stack Overflow Enterprise using PKCE flow
* Backend authentication client for Stack Overflow Internal Enterprise using PKCE flow
* Designed for server-side Node.js environments with access to crypto module
*/
export class BackendAuthClient {
private config: AuthConfig;

/**
* Creates a new backend authentication client
* @param config - Authentication configuration for Stack Overflow Enterprise
* @param config - Authentication configuration for Stack Overflow Internal Enterprise
*/
constructor(config: AuthConfig) {
this.config = config;
Expand Down Expand Up @@ -44,7 +44,7 @@ export class BackendAuthClient {
}

/**
* Generate authorization URL for Stack Overflow Enterprise with PKCE
* Generate authorization URL for Stack Overflow Internal Enterprise with PKCE
* Creates the URL where users should be redirected to authorize your application
*
* @returns Promise resolving to authorization data including the URL and tokens to store
Expand All @@ -67,7 +67,7 @@ export class BackendAuthClient {

const { codeVerifier, codeChallenge, state } = await this.generatePKCETokens();

// Stack Overflow Enterprise uses /oauth endpoint, not /oauth/authorize
// Stack Overflow Internal Enterprise uses /oauth endpoint, not /oauth/authorize
const authUrl = `${this.config.baseUrl}/oauth?client_id=${
this.config.clientId
}&redirect_uri=${encodeURIComponent(
Expand Down Expand Up @@ -106,7 +106,7 @@ export class BackendAuthClient {
throw new Error('clientId and redirectUri are required for authentication');
}

// Stack Overflow Enterprise uses /oauth/access_token/json endpoint
// Stack Overflow Internal Enterprise uses /oauth/access_token/json endpoint
const tokenUrl = `${this.config.baseUrl}/oauth/access_token/json`;

const queryParams = new URLSearchParams({
Expand Down
14 changes: 7 additions & 7 deletions sdk/src/auth/frontend.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { AuthConfig } from './types.js';

/**
* Frontend authentication client for Stack Overflow Enterprise
* Frontend authentication client for Stack Overflow Internal Enterprise
* This client communicates with your backend API to handle OAuth flows securely.
* The backend performs all PKCE operations and token exchanges.
*/
Expand All @@ -11,7 +11,7 @@ export class FrontendAuthClient {

/**
* Creates a new frontend authentication client
* @param config - Authentication configuration for Stack Overflow Enterprise
* @param config - Authentication configuration for Stack Overflow Internal Enterprise
* @param apiBaseUrl - Base URL of your backend API that handles OAuth operations
*/
constructor(config: AuthConfig, apiBaseUrl: string = '/api') {
Expand All @@ -28,7 +28,7 @@ export class FrontendAuthClient {
* @example
* ```typescript
* const authUrl = await frontendClient.startAuth();
* window.location.href = authUrl; // Redirect user to Stack Overflow Enterprise
* window.location.href = authUrl; // Redirect user to Stack Overflow Internal Enterprise
* ```
*/
async startAuth(): Promise<string> {
Expand All @@ -44,8 +44,8 @@ export class FrontendAuthClient {
* Complete the authentication process by sending the callback parameters to your backend
* Your backend will validate the state, exchange the code for tokens, and store them securely
*
* @param code - The authorization code received from Stack Overflow Enterprise callback
* @param state - The state parameter received from Stack Overflow Enterprise callback
* @param code - The authorization code received from Stack Overflow Internal Enterprise callback
* @param state - The state parameter received from Stack Overflow Internal Enterprise callback
* @throws {Error} When the backend request fails or authentication is invalid
* @example
* ```typescript
Expand Down Expand Up @@ -117,9 +117,9 @@ export class FrontendAuthClient {

/**
* Submit an access token directly (for cases where user provides their own token)
* Allows users to manually provide a Stack Overflow Enterprise access token
* Allows users to manually provide a Stack Overflow Internal Enterprise access token
*
* @param token - The Stack Overflow Enterprise access token
* @param token - The Stack Overflow Internal Enterprise access token
* @returns Promise resolving to true if token was accepted, false otherwise
* @example
* ```typescript
Expand Down
12 changes: 6 additions & 6 deletions sdk/src/auth/types.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
/**
* Configuration for Stack Overflow Enterprise authentication using PKCE
* Configuration for Stack Overflow Internal Enterprise authentication using PKCE
*/
export interface AuthConfig {
/** The OAuth client ID from your Stack Overflow Enterprise application */
/** The OAuth client ID from your Stack Overflow Internal Enterprise application */
clientId: string;
/** The redirect URI registered with your Stack Overflow Enterprise application */
/** The redirect URI registered with your Stack Overflow Internal Enterprise application */
redirectUri: string;
/** The base URL of your Stack Overflow Enterprise instance (e.g., 'https://acme.stackenterprise.co') */
baseUrl: string; // Stack Overflow Enterprise instance URL
/** The base URL of your Stack Overflow Internal Enterprise instance (e.g., 'https://acme.stackenterprise.co') */
baseUrl: string; // Stack Overflow Internal Enterprise instance URL
/** OAuth scope to request (defaults to read-only access if not specified) */
scope?: string;
}

/**
* Response from Stack Overflow Enterprise token exchange endpoint
* Response from Stack Overflow Internal Enterprise token exchange endpoint
*/
export interface TokenResponse {
/** The access token for making authenticated API requests */
Expand Down
Loading