Stuck on Final OAuth2 Step – Bubble ↔ GoHighLevel : 401 / 422 Errors After “Choose Location”

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!


:white_check_mark: 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=XXXX back to Bubble (confirmed in debugger).

:wrench: 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)

:cross_mark: Errors I still see

  1. 401 No Authorization header found for authentication
    Appears when Bubble tries to run any call after authorization.

  2. 422 client_id / client_secret should not be empty
    Shows up if I toggle “Requesting token uses Basic Auth”.

  3. Bubble keeps the warning

    “You haven’t tested this API in run mode…”
    because the token never gets stored as Valid.


:test_tube: 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/token works (returns JSON with access_token).
  • Added a simple GET /v2/locations call, :key: Use Oauth ticked.

:bullseye: Goal

All I need is for Bubble to:

  1. Exchange the code for access_token + refresh_token.
  2. 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 Version header or scope encoding.

Thanks in advance! :folded_hands:

If you want to use user-agent auth, you need to have a userinfo endpoint and a user created so Bubble can store access token.

You can use manual auth process instead… but honestly, without a user logged in, this will be really not safe for user to authorize your app or user will need to reauthorize your app each time…

Also, please share the api connector settings screenshot instead.