Stuck on Final OAuth 2 Step – Bubble ↔ GoHighLevel
401 / 422 Errors After “Choose Location”
Hi everyone,
I’m integrating GoHighLevel (GHL) with Bubble using OAuth 2 – User-Agent Flow, and I keep getting blocked on the token-exchange step. Hoping someone has solved this before!
What already works
- Authorize screen appears
https://marketplace.gohighlevel.com/oauth/chooselocation - I see all requested scopes and can pick my Location.
- The URL returns
?code=XXXXback to Bubble (confirmed in debugger).
Current API Connector settings
| Setting | Value |
|---|---|
| Auth type | OAuth 2 User-Agent Flow |
| Login dialog | https://marketplace.gohighlevel.com/oauth/chooselocation |
| Keys | response_type=code · client_id=<ID> · redirect_uri=<Bubble URI> · scope=conversations.readonly … users.readonly |
| Access-token endpoint | https://services.leadconnectorhq.com/oauth/token |
| Requesting token uses Basic Auth | OFF |
| Shared header | Version: 2021-07-28 |
| User profile endpoint | (blank – no Bubble user creation needed) |
Errors I still see
-
401 No Authorization header found for authentication
Appears when Bubble tries to run any call after authorization. -
422 client_id / client_secret should not be empty
Shows up if I toggle “Requesting token uses Basic Auth”. -
Bubble keeps the warning
“You haven’t tested this API in run mode…”
because the token never gets stored as Valid.
Things I’ve tried
- Double-checked client ID / secret (no spaces).
- Verified redirect_uri matches exactly in GHL & Bubble.
- Added / removed extra headers (
Authorization: Basic …,Content-Type). - Manual cURL
POST /oauth/tokenworks (returns JSON withaccess_token). - Added a simple GET /v2/locations call,
Use Oauth ticked.
Goal
All I need is for Bubble to:
- Exchange the
codeforaccess_token+refresh_token. - Mark the API Valid so I can hit
/v2/conversations,/v2/messages, etc.
If anyone has a working Bubble ⇄ GHL OAuth setup (without external tools) I’d love to know:
- Exact headers Bubble sends on the token request.
- Whether “Requesting token uses Basic Auth” is ON or OFF.
- Any quirks with the
Versionheader or scope encoding.
Thanks in advance! ![]()