ghl-sdk
Unofficial async Rust SDK for the GoHighLevel (HighLevel) API 2.0.
- Auth: Private Integration Tokens (
pit-…), raw OAuth access tokens, or full OAuth 2.0 with automatic refresh and pluggableTokenStores. Agency→location token exchange (Ghl::as_location) for multi-tenant work. - Resilience: retries with exponential backoff + jitter,
Retry-Aftersupport on 429s, idempotent-only retry on 5xx/transport errors, live rate-limit headroom viaGhl::rate_status(). - Pagination: GoHighLevel's cursor scheme handled for you, exposed as
Streams. - Config: builder parameters or environment variables (
GHL_PIT_TOKEN,GHL_ACCESS_TOKEN,GHL_BASE_URL) — explicit parameters always win. - Secret hygiene: tokens are
secrecytypes, redacted from allDebugoutput. - Forward-compatible types: unknown response fields are preserved in an
extramap instead of breaking deserialization.
use ;
use TryStreamExt;
async
Typed coverage today: contacts, opportunities, conversations, calendars, locations, plus OAuth/token exchange. Any other endpoint in GoHighLevel's 41-module API is reachable right now through ghl.request_raw() (arbitrary method/path/query/body, same auth + retry + rate-limit handling) or the convenience get_raw() / post_raw() helpers.
Looking for the AI-agent side? See ghl-mcp, the MCP server built on this SDK.
License: MIT or Apache-2.0. Not affiliated with HighLevel Inc.