| name | palantir-install-auth |
| description | Install and configure Palantir Foundry SDK authentication with OAuth2 or token auth.
Use when setting up a new Foundry integration, configuring API credentials,
or initializing the foundry-platform-sdk in your project.
Trigger with phrases like "install palantir", "setup palantir",
"palantir auth", "configure palantir API key", "foundry SDK setup".
|
| allowed-tools | Read, Write, Edit, Bash(npm:*), Bash(pip:*), Grep |
| version | 1.5.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","palantir","foundry","authentication","setup"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Palantir Install & Auth
Overview
Set up the Palantir Foundry Platform SDK (Python or TypeScript) and configure authentication using either bearer tokens for development or OAuth2 client credentials for production. Covers both the Platform SDK for direct API access and the OSDK for Ontology-based workflows.
Prerequisites
- Python 3.9+ or Node.js 18+
- A Palantir Foundry enrollment with API access enabled
- A third-party application registered in Developer Console (for OAuth2)
- Your Foundry hostname (e.g.,
mycompany.palantirfoundry.com)
Instructions
Step 1: Install the SDK
Python (Platform SDK):
set -euo pipefail
pip install foundry-platform-sdk
python -c "import foundry; print(f'foundry-platform-sdk {foundry.__version__} installed')"
Python (OSDK for Ontology access):
set -euo pipefail
pip install palantir-sdk
python -c "import palantir; print('palantir-sdk installed')"
TypeScript (OSDK):
set -euo pipefail
npm install @osdk/client @osdk/oauth
npx tsc --version
Step 2: Configure Environment Variables
FOUNDRY_HOSTNAME=mycompany.palantirfoundry.com
FOUNDRY_TOKEN=eyJhbGciOiJS...
FOUNDRY_CLIENT_ID=abc123
FOUNDRY_CLIENT_SECRET=secret456
Step 3: Initialize with Bearer Token (Development)
import os
import foundry
client = foundry.FoundryClient(
auth=foundry.UserTokenAuth(
hostname=os.environ["FOUNDRY_HOSTNAME"],
token=os.environ["FOUNDRY_TOKEN"],
),
hostname=os.environ["FOUNDRY_HOSTNAME"],
)
datasets = client.datasets.Dataset.list()
for ds in datasets:
()