navan-common-errors
Diagnose and fix common Navan API errors with targeted fix procedures. Use when an API call returns an unexpected HTTP error or when debugging production failures. Trigger with "navan error", "fix navan", "debug navan", "navan 401", "navan 403", "navan 429".
What this skill does
# Navan Common Errors
## Overview
Diagnose and resolve Navan API errors using targeted fix procedures. All errors surface as raw HTTP status codes since Navan has **no public SDK** — this guide covers 401, 403, 404, 429, 500, and 503 with curl-based diagnostics.
**Purpose:** Identify the root cause of a Navan API error and apply the correct fix.
## Prerequisites
- Navan API credentials configured (see `navan-install-auth`)
- `curl` and `jq` available in your terminal
- Environment variables set: `NAVAN_CLIENT_ID`, `NAVAN_CLIENT_SECRET`, `NAVAN_BASE_URL`
## Instructions
### Error 401 — Unauthorized (Invalid or Expired OAuth Token)
**Root causes:**
1. OAuth token has expired (tokens have a limited `expires_in` window)
2. `client_secret` was rotated in the Navan dashboard but not updated in `.env`
3. Malformed `Authorization` header (missing `Bearer` prefix)
4. Token from a different Navan organization
**Diagnostic steps:**
```bash
# 1. Verify credentials can still obtain a token
curl -s -X POST https://api.navan.com/ta-auth/oauth/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials&client_id=$NAVAN_CLIENT_ID&client_secret=$NAVAN_CLIENT_SECRET" \
| python3 -c "import sys,json; d=json.load(sys.stdin); print('TOKEN OK' if 'access_token' in d else f'FAIL: {d}')"
# 2. Check if existing token is expired
echo "Token var length: ${#NAVAN_TOKEN}"
```
**Fix:** Re-run the token exchange. If that also returns 401, regenerate credentials at **Admin > Travel admin > Settings > Integrations > Navan API Credentials**.
### Error 403 — Forbidden (Insufficient Permissions)
**Root causes:**
1. API credentials lack required scopes for the endpoint
2. Account is on Business tier but endpoint requires Enterprise
3. Expense Transaction API not enabled (requires separate Navan support request)
4. User role lacks admin permissions for admin-only endpoints
**Diagnostic steps:**
```bash
# Test the bookings endpoint
TOKEN=$(curl -s -X POST https://api.navan.com/ta-auth/oauth/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials&client_id=$NAVAN_CLIENT_ID&client_secret=$NAVAN_CLIENT_SECRET" \
| python3 -c "import sys,json; print(json.load(sys.stdin)['access_token'])")
echo "Bookings:" && curl -s -o /dev/null -w "%{http_code}" \
"https://api.navan.com/v1/bookings?page=0&size=1" -H "Authorization: Bearer $TOKEN"
```
**Fix:** If the bookings endpoint returns 403, your credentials lack the required scope. Contact Navan support. If the Expense API returns 403, it requires separate enablement — request it through your Navan account manager.
### Error 404 — Not Found (Invalid Endpoint)
**Root causes:**
1. Typo in endpoint path
2. Using a legacy or reverse-engineered endpoint that no longer exists
3. Referencing an endpoint not available on your Navan tier
**Known valid endpoints (from Airbyte connector source):**
| Endpoint | Method | Description |
|----------|--------|-------------|
| `/ta-auth/oauth/token` | POST | OAuth token exchange (client_credentials) |
| `/v1/bookings` | GET | Booking records (paginated with `page` + `size`) |
> **Note:** Older references to endpoints like `/get_user_trips`, `/get_admin_trips`, `/get_users` originate from Supergood's reverse-engineered browser automation and are not part of the official Navan REST API. Use `/v1/bookings` for booking data.
**Fix:** Verify the endpoint path against the table above. The Navan API uses `/v1/` prefixed paths at `https://api.navan.com`.
### Error 429 — Rate Limited
**Root causes:**
1. Exceeding the per-minute request limit
2. Automated scripts making rapid sequential calls without throttling
3. Multiple services sharing the same credentials
**Diagnostic steps:**
```bash
# Check rate limit headers in response
curl -s -D - "https://api.navan.com/v1/bookings?page=0&size=1" \
-H "Authorization: Bearer $TOKEN" \
-o /dev/null 2>&1 | grep -i "rate\|retry\|limit"
```
**Fix:** Implement exponential backoff. Start with a 2-second delay, doubling on each retry up to 3 attempts. Cache tokens to avoid redundant auth requests. If using multiple services, consider separate credentials per service.
```typescript
async function withBackoff<T>(fn: () => Promise<T>, maxRetries = 3): Promise<T> {
for (let i = 0; i < maxRetries; i++) {
try { return await fn(); }
catch (err: any) {
if (err.status !== 429 || i === maxRetries - 1) throw err;
await new Promise(r => setTimeout(r, Math.pow(2, i + 1) * 1000));
}
}
throw new Error('Max retries exceeded');
}
```
### Error 500 — Internal Server Error
**Root causes:**
1. Navan backend service failure
2. Malformed request body causing server-side exception
3. Data inconsistency in your organization's records
**Diagnostic steps:**
```bash
# Test with minimal request to isolate
curl -s -w "\nHTTP %{http_code}" "https://api.navan.com/v1/bookings?page=0&size=1" \
-H "Authorization: Bearer $TOKEN"
```
**Fix:** Retry after 30 seconds. If the error persists across multiple endpoints, it is likely a Navan-side outage. If only one endpoint fails, check your request body for malformed JSON. For persistent 500 errors, contact Navan support with the endpoint, timestamp, and request ID from the response headers.
### Error 503 — Service Unavailable (Maintenance)
**Root causes:**
1. Scheduled Navan maintenance window
2. Navan infrastructure scaling event
3. Regional AWS outage (Navan is AWS-hosted)
**Fix:** Wait and retry with exponential backoff. Check the Navan Help Center for maintenance announcements. 503 errors are typically transient and resolve within minutes. Implement circuit-breaker patterns for production systems to avoid cascading failures during extended outages.
## Output
This error reference delivers:
- Six HTTP error codes with Navan-specific root causes
- Copy-paste diagnostic curl commands for each error type
- Fix procedures ranked by likelihood
- A backoff implementation for automated retry handling
## Error Handling
| Error | Code | Most Likely Cause | First Action |
|-------|------|-------------------|--------------|
| Unauthorized | 401 | Expired OAuth token | Re-run token exchange |
| Forbidden | 403 | Tier or scope limitation | Check plan tier; contact Navan support |
| Not found | 404 | Wrong endpoint path | Verify against known endpoints table |
| Rate limited | 429 | No throttling in client code | Add exponential backoff |
| Server error | 500 | Navan backend issue | Retry after 30s; check request body |
| Maintenance | 503 | Navan downtime | Wait and retry; check help center |
## Examples
**Full diagnostic script:**
```bash
#!/bin/bash
echo "=== Navan API Diagnostic ==="
echo "1. Testing authentication..."
AUTH_RESULT=$(curl -s -w "\n%{http_code}" -X POST https://api.navan.com/ta-auth/oauth/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials&client_id=$NAVAN_CLIENT_ID&client_secret=$NAVAN_CLIENT_SECRET")
AUTH_CODE=$(echo "$AUTH_RESULT" | tail -1)
echo " Auth: HTTP $AUTH_CODE"
if [ "$AUTH_CODE" = "200" ]; then
TOKEN=$(echo "$AUTH_RESULT" | head -1 | python3 -c "import sys,json; print(json.load(sys.stdin)['access_token'])")
echo "2. Testing bookings (page 0)..."
curl -s -o /dev/null -w " Bookings: HTTP %{http_code}\n" \
"https://api.navan.com/v1/bookings?page=0&size=1" -H "Authorization: Bearer $TOKEN"
else
echo " Auth failed — check NAVAN_CLIENT_ID and NAVAN_CLIENT_SECRET"
fi
```
## Resources
- [Navan Help Center](https://app.navan.com/app/helpcenter) — announcements and maintenance notices
- [Navan TMC API Docs](https://app.navan.com/app/helpcenter/articles/travel/admin/other-integrations/navan-tmc-api-integration-documentation) — API reference
- [Navan Security & Compliance](https://navan.com/security) — SOC 2 Type II, ISO 27001, PCI DSS Level 1
- [Navan Integrations](https://navan.com/integrations) — partner ecosystem and integratRelated in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.