If your API call just threw a 401 Unauthorized or 404 Not Found, there is a very good chance you passed a missing or malformed Location ID. Every sub-account in GoHighLevel runs in its own isolated silo, tied to a 20-to-22-character alphanumeric string like ve9Aq3sw2KMgt9cA81Va. Here is how to track it down across the dashboard, REST API, webhooks, and the browser console.

Method 1: Grab the Location ID Directly from the Browser URL
This is the fastest route if you just need the ID right now for a quick Zapier or Postman test. No clicking through nested settings menus.
- Log in to your HighLevel dashboard.
- Use the top-left switcher to jump into the target sub-account.
- Check the address bar.
Depending on whether you are on the newer v2 interface or legacy routing, your URL looks like one of these:
# Standard HighLevel App URL format:
https://app.gohighlevel.com/v2/location/ve9Aq3sw2KMgt9cA81Va/dashboard # Custom Agency Domain URL format:
https://app.youragencydomain.com/location/ve9Aq3sw2KMgt9cA81Va/launchpadCopy the string right after /location/. Grab everything between /location/ and the next slash (/). Leave off the trailing slashes and any query parameters.
Method 2: Check Sub-Account Business Profile Settings
If you need the Location ID alongside company metadata (like phone, address, or business email), grab it from the profile page.
- Switch into the sub-account.
- Hit Settings at the bottom of the left sidebar.
- Click Business Profile (labeled Company on older agency layouts).
- Scroll down to the General Information section.
- Look for the field labeled Location ID (or API Key / Location ID).
Click the copy icon next to the input. This is safer than grabbing it from the URL on narrow screens where query strings get truncated.
Method 3: Locate Sub-Account IDs from the Agency View in Bulk
If you manage dozens of client accounts, opening each one individually is painful. You can view all sub-account IDs in one central table from the agency level.
- Switch to Agency View using the account dropdown in the top-left corner.
- Click Sub-Accounts in the sidebar.
- Find your sub-account in the list.
- Look directly at the ID column (or click the three dots … on the right and hit Manage Client).
Clicking the sub-account name inside that list also navigates you to /agency/sub-accounts/{locationId}/edit, which puts the ID right in your browser path.
Method 4: Extract Location ID via HighLevel API v2 (OAuth and REST)
When building a multi-tenant backend or a Marketplace app, never hardcode static IDs. When a user authorizes your app via OAuth, HighLevel hands back the locationId directly inside the token exchange response.
Here is what the token payload looks like according to the HighLevel API docs:
{ "access_token": "pit-48b91234-a1b2-4c3d-8e5f-1234567890ab", "token_type": "Bearer", "expires_in": 86400, "refresh_token": "ref-98a76543-z9y8-7x6w-5v4u-0987654321ba", "scope": "contacts.readonly contacts.write locations.readonly", "userType": "Location", "locationId": "ve9Aq3sw2KMgt9cA81Va", "companyId": "comp_77x88y99z00a11b"
}Store that locationId alongside your refresh token in your database. If you are wiring this up in Node, check our guide on GoHighLevel API v2 OAuth token refresh in Node.js to keep your sessions alive.
If you already have an Agency-level token with the locations.readonly scope, query all sub-accounts under your agency programmatically using the search endpoint:
import axios from 'axios'; async function getSubAccountLocationIds(agencyAccessToken) { try { const response = await axios.get('https://services.leadconnectorhq.com/locations/search', { headers: { 'Authorization': `Bearer ${agencyAccessToken}`, 'Version': '2021-07-28' }, params: { limit: 20 } }); const accounts = response.data.locations.map(loc => ({ name: loc.name, locationId: loc.id, email: loc.email })); console.log('Sub-Account Location IDs:', accounts); return accounts; } catch (error) { console.error('Failed to fetch locations:', error.response?.data || error.message); throw error; }
}This script calls /locations/search and maps out each client’s name and immutable id. It is especially handy if you sync databases or push bulk contacts from Google Sheets with our Apps Script to HighLevel guide.
Method 5: Extract Location ID from Inbound Webhooks & Workflows
Whenever a HighLevel workflow triggers an outbound webhook (HTTP POST), it automatically attaches contextual metadata to the request body.
Here is what a typical workflow webhook payload looks like on your server:
{ "type": "ContactCreate", "locationId": "ve9Aq3sw2KMgt9cA81Va", "id": "c123456789abcdef", "contact": { "first_name": "John", "last_name": "Doe", "email": "john.doe@example.com", "phone": "+15551234567" }, "workflow": { "id": "wf_abc123456", "name": "New Lead Processing" }
}The locationId is always sitting right at the root of the JSON body. If your Express backend handles incoming webhooks across multiple client sub-accounts, use this key to route actions to the correct database tenant. If webhooks are randomly dropping out, check our fix for GoHighLevel webhooks that fail to fire.
To prevent bad payloads from crashing your handlers, validate them at runtime with a schema library. See our guide on how to validate webhook payloads with Zod in Express.
Method 6: Check Browser Console on Funnels and Client Portals
Testing tracking pixels, custom widgets, or embed scripts on a live funnel and do not have agency dashboard access? You can pull the Location ID right out of the DOM.
- Open the live HighLevel funnel or website page in your browser.
- Open Developer Tools (
F12orCmd+Option+I). - Click over to the Console tab.
- Run this snippet:
// Check global HighLevel objects injected by the page builder
const locId = window.locationId || window.__NUXT__?.state?.locationId || document.querySelector('meta[name="location-id"]')?.content; console.log('Detected Location ID:', locId);Most HighLevel pages expose the Location ID in internal script states or on embedded form attributes.
Location ID vs Company ID vs User ID: Don’t Mix Them Up
Mixing up IDs is the most common reason HighLevel integrations throw 401 or 403 errors:
- Location ID (Sub-Account ID): Identifies the specific client workspace holding contacts, pipelines, calendars, and funnels (e.g.,
ve9Aq3sw2KMgt9cA81Va). This is what 95% of API endpoints and automations expect. - Company ID (Agency ID): Identifies the parent Agency account that owns the sub-accounts. Only used in agency-wide billing and provisioning endpoints.
- User ID: Identifies a single human user (admin, agent, staff) who logs into the dashboard (e.g.,
usr_99x88y77z). Never pass this where an endpoint expects a Location ID. - API Key (v1 Legacy): Older v1 setups used a 64-character static API key. HighLevel v2 deprecated these in favor of OAuth tokens and Private Integrations scoped directly to a
locationId.
Troubleshooting: API Endpoint Rejects Your Location ID
If you copied the ID but your request still fails, check these three gotchas:
- Trailing whitespace: Copy-pasting from the URL bar often sneaks in trailing spaces or newlines. Run
.trim()on your string before passing it into request params. - Version header mismatch: HighLevel v2 requires the
Version: 2021-07-28header on base URLhttps://services.leadconnectorhq.com. Check the GoHighLevel Help Center if your calls return unexpected 404s. - Token scope mismatch: If your OAuth access token was authorized for Sub-Account A, querying Sub-Account B with that token triggers a
403 Forbiddeneven if Sub-Account B’s Location ID is completely valid.
Frequently Asked Questions
Can a sub-account Location ID change over time?
No. It is an immutable database primary key assigned when the sub-account is created. Renaming the business, changing custom domains, or transferring ownership to another agency will not change it.
Where do I find the Location ID in the HighLevel mobile app?
The LeadConnector mobile app does not display raw database IDs in its settings screen. Open Chrome or Safari on your phone, log in to the web app, and pull it from the URL bar instead.
Is the Location ID considered a private secret?
No. HighLevel funnel pages and public form widgets expose the Location ID in client-side HTML. It is an identifier, not a secret. Read/write access to your data still requires an authenticated Bearer token or active session.
How do I find my Location ID if I only have client login access?
Standard client users can grab the ID directly from the browser URL after logging in, or by navigating to Settings > Business Profile if their role has permission to view company settings.
Next Steps
Once you have the Location ID locked in, you can start wiring up automated pipelines. If you want to connect external spreadsheets into your CRM, check out our guide on pushing Google Sheets contacts to the GoHighLevel API.

