Skip to main content

Go High Level Python

Go Highlevel Python ease of use library implementation to their API

Static Badge Static Badge Static Badge Static Badge


Highlevel

Go Highlevel ease of use library implementation to their API. Make sure you've create a Go Highlevel App in the Market Place

Brief Overview of the Library

We recommend that you glance over the official Go Highlevel Documentation. We have tried to make the library have a corresponding function for each endpoint. Enjoy the intellisense!

Initialization

from gohighlevel import GoHighLevel
from gohighlevel.classes.auth.credentials import Credentials

credentials=Credentials(api_key="***")
ghl = GoHighLevel(credentials=credentials)

OAuth URL

from gohighlevel import GoHighLevel
from gohighlevel.classes.auth.credentials import Credentials


# Initialize with your client ID and secret
credentials=Credentials(
    client_id="your_client_id",
    client_secret="your_client_secret"
)

# Initialize with your client ID and secret
ghl = GoHighLevel(credentials=credentials)

# Get OAuth URL
oauth_url = ghl.get_oauth_url(
    redirect_uri="your_redirect_uri",
    scope=["contacts.readonly", "calendars.write"]
)
print(oauth_url)

OAuth Callback

from gohighlevel import GoHighLevel
from gohighlevel.classes.auth.credentials import Credentials


# Initialize with your client ID and secret
credentials=Credentials(
    client_id="your_client_id",
    client_secret="your_client_secret"
)
ghl = GoHighLevel(credentials=credentials)

# Exchange code for tokens
tokens = ghl.exchange_code(
    code="auth_code_from_callback",
    redirect_uri="your_redirect_uri"
)
print(tokens)  # Contains access_token, refresh_token, etc.

Calendar Management Examples

# Get all calendars for a location
calendars = ghl.calendar.get_all(location_id="your_location_id")

# Create a new calendar
new_calendar = ghl.calendar.add({
    "name": "Team Meetings",
    "description": "Calendar for team meetings",
    "locationId": "your_location_id"
})

# Get calendar events
events = ghl.calendar.events.get_all(
    location_id="your_location_id",
    start_time="2024-01-01T00:00:00Z",
    end_time="2024-01-31T23:59:59Z"
)

# Create an appointment
appointment = ghl.calendar.events.add_appointment(
    location_id="your_location_id",
    contact_id="contact_id",
    start_time="2024-01-15T10:00:00Z",
    calendar={
        "title": "Project Review",
        "duration": 60,
        "calendarId": "calendar_id"
    }
)

# Manage calendar groups
groups = ghl.calendar.groups.get_all()

new_group = ghl.calendar.groups.add({
    "name": "Sales Team",
    "description": "Calendar group for sales team",
    "locationId": "your_location_id"
})

# Manage calendar resources
rooms = ghl.calendar.resources.get_all(resource_type="rooms")

new_room = ghl.calendar.resources.add(
    resource_type="rooms",
    resource={
        "name": "Conference Room A",
        "capacity": 20,
        "locationId": "your_location_id"
    }
)

# Manage calendar notifications
notifications = ghl.calendar.notifications.get_all(
    calendar_id="calendar_id",
    extra={
        "is_active": True,
        "limit": 10
    }
)

# Create appointment notes
note = ghl.calendar.appointmentnotes.add(
    appointment_id="appointment_id",
    body="Meeting notes: Discussed project timeline",
    user_id="user_id"
)

Using Contacts API

# Search contacts
searched_contacts = ghl.contacts.search(query="martin")

# Get all contacts
contacts = ghl.contacts.get_all(location_id="your_location_id")

# Create a new contact
new_contact = ghl.contacts.add({
    "firstName": "John",
    "lastName": "Doe",
    "email": "john.doe@example.com",
    "phone": "+1234567890",
    "locationId": "your_location_id"
})

# Add a task for a contact
task = ghl.contacts.tasks.add(
    contact_id="contact_id",
    title="Follow up",
    due_date="2024-01-15T10:00:00Z"
)

Using Conversations API

# Get all conversations
conversations = ghl.conversations.get_all(location_id="your_location_id")

# Get conversation messages
messages = ghl.conversations.messages.get_all(
    conversation_id="conversation_id",
    limit=50,
    skip=0
)

# Send a message
new_message = ghl.conversations.messages.add(
    conversation_id="conversation_id",
    message={
        "body": "Hello! How can I help you today?",
        "type": "text"
    }
)

# Send an email in conversation
email_message = ghl.conversations.email.send(
    conversation_id="conversation_id",
    email={
        "subject": "Meeting Follow-up",
        "body": "Thank you for your time today...",
        "to": ["recipient@example.com"]
    }
)

# Get conversation providers
providers = ghl.conversations.providers.get_all(location_id="your_location_id")

# Update conversation status
updated_conversation = ghl.conversations.update(
    conversation_id="conversation_id",
    data={
        "status": "closed",
        "assignedTo": "user_id"
    }
)

# Search conversations
search_results = ghl.conversations.search(
    location_id="your_location_id",
    query="customer support",
    filters={
        "status": "open",
        "dateRange": {
            "startDate": "2024-01-01T00:00:00Z",
            "endDate": "2024-01-31T23:59:59Z"
        }
    }
)

Support

You can support us with any amount. It's all appreciated.

Buy Me A Coffee PayPal Logo

Support (from Malawi or USA)

Support via Paychangu

Metadata

Release files for gohl 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gohl 1.0.3
File Size Uploaded
gohl-1.0.3.tar.gz 60.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gohl 1.0.3
File Interpreter ABI Platform
gohl-1.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 142.7 kB

Release files / gohl-1.0.3.tar.gz

Download URL gohl-1.0.3.tar.gz
Size 60.5 kB
Tags Source
SHA-256 checksum
How to use checksums
7f2c3dfc876c3e324f53b7847e13bf27abfee753890eeddbb137188b61320e7f
BLAKE2b-256 checksum
How to use checksums
cbb20bd1556f1cdc9d11e6502deeb1a12f3d270bf10d6efee1f8520f70cbd8e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2025.

Transparency log

Release files / gohl-1.0.3-py3-none-any.whl

Download URL gohl-1.0.3-py3-none-any.whl
Size 82.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
21105ae8f9c7b3440c344296382aea8a63eb6551ccf93b7a952ccf2124676d5d
BLAKE2b-256 checksum
How to use checksums
0912a21b6ca8a9476044905e872d4100e72b16379135a15fa80e23704795be16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page