Set up OAuth 2.0 authentication for the Navan REST API.
Use when configuring a new Navan integration or rotating API credentials.
Trigger with "install navan", "setup navan auth", "navan credentials", "navan oauth".
Set up OAuth 2.0 authentication for the Navan REST API.
Use when configuring a new Navan integration or rotating API credentials.
Trigger with "install navan", "setup navan auth", "navan credentials", "navan oauth".
allowed-tools
Read, Write, Edit, Bash(npm:*), Bash(pip:*), Grep
version
1.7.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
["saas","navan","travel"]
compatibility
Designed for Claude Code
Navan Install & Auth
Overview
Configure OAuth 2.0 client credentials for the Navan REST API. Navan has no public SDK — all API access uses raw REST calls with bearer tokens obtained via the client_credentials grant.
Purpose: Obtain a working OAuth 2.0 bearer token for calling Navan API endpoints.
Prerequisites
Navan admin access — you need the Admin or Travel Admin role
Node.js 18+ (for TypeScript) or Python 3.8+ (for Python)
A .env-aware project (dotenv for Node, python-dotenv for Python)
Navan Business tier or higher (free for up to 300 employees)
Instructions
Step 1: Create OAuth Credentials in Navan Dashboard
Navigate to: Admin > Travel admin > Settings > Integrations > Navan API Credentials > Create New
Save the client_id and client_secret immediately — credentials are only viewable once. If lost, you must revoke and regenerate.
Step 2: Store Credentials Securely
Create a .env file in your project root:
# .env — NEVER commit this file
NAVAN_CLIENT_ID="your-client-id-here"
NAVAN_CLIENT_SECRET="your-client-secret-here"
NAVAN_BASE_URL="https://api.navan.com"
Ensure .env is in your .gitignore:
echo".env" >> .gitignore
Step 3: Token Exchange (TypeScript)
Install dependencies and implement the OAuth 2.0 client credentials flow:
After authentication is working, proceed to navan-hello-world to make your first API call, or see navan-sdk-patterns to build a reusable typed wrapper.