agentsclimarketplace

Glean install auth

Skill jeremylongshore/claude-code-plugins-plus-skills/plugins/saas-packs/glean-pack/skills/glean-install-auth

'Install and configure Glean API authentication with indexing and client tokens.From its SKILL.md

Install
npx -y skills add jeremylongshore/claude-code-plugins-plus-skills --skill glean-install-auth

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

What its file declares

Copied from the file, not written here

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

3.5 KB, 733 tokens by cl100k_base, as published. Nobody here has run it

Glean Install & Auth

Overview

Configure Glean API authentication for enterprise search and knowledge management. Glean has two APIs: the Indexing API (push content into search) and the Client API (search and retrieve). Each uses separate tokens. Base URL: https://<domain>-be.glean.com/api.

Prerequisites

  • Glean enterprise account with admin access
  • API token from Glean Admin > API Tokens
  • Your Glean deployment domain (e.g., company-be.glean.com)

Instructions

Step 1: Obtain API Tokens

Navigate to Glean Admin Console > Settings > API:

Token TypePurposeRequired Header
Indexing API tokenPush documents into search indexAuthorization: Bearer <token>
Client API tokenSearch, chat, user-scoped queriesAuthorization: Bearer <token> + X-Glean-Auth-Type: BEARER

Step 2: Configure Environment Variables

# .env (NEVER commit)
GLEAN_DOMAIN=company-be.glean.com
GLEAN_INDEXING_TOKEN=glean_idx_...
GLEAN_CLIENT_TOKEN=glean_cli_...
GLEAN_DATASOURCE=custom_app  # Your custom datasource name

Step 3: Install SDK and Verify

npm install @anthropic-ai/glean-indexing-api-client  # Or use fetch directly
const GLEAN_BASE = `https://${process.env.GLEAN_DOMAIN}/api`;

// Verify indexing API access
async function verifyIndexingAccess() {
  const res = await fetch(`${GLEAN_BASE}/index/v1/getdatasourceconfig`, {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${process.env.GLEAN_INDEXING_TOKEN}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({ datasource: process.env.GLEAN_DATASOURCE }),
  });
  const config = await res.json();
  console.log(`Connected. Datasource: ${config.name}`);
}

// Verify client API access
async function verifySearchAccess() {
  const res = await fetch(`${GLEAN_BASE}/client/v1/search`, {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${process.env.GLEAN_CLIENT_TOKEN}`,
      'X-Glean-Auth-Type': 'BEARER',
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({ query: 'test', pageSize: 1 }),
  });
  const results = await res.json();
  console.log(`Search works. Found ${results.results?.length ?? 0} results.`);
}

Error Handling

ErrorCodeCauseSolution
Unauthorized401Invalid tokenRegenerate in Admin > API Tokens
Forbidden403Token lacks scopeUse correct token type (indexing vs client)
Not Found404Wrong domainVerify GLEAN_DOMAIN includes -be suffix

Resources

Next Steps

After auth, proceed to glean-hello-world for your first index and search.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,144. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.