From b01b0f703cc8b98e43f4aaa9a3f57997e30b6234 Mon Sep 17 00:00:00 2001 From: Head of Product & Engineering Date: Mon, 6 Apr 2026 11:38:53 +0200 Subject: [PATCH] fix: accept 201 Created from /oauth/locationToken endpoint GHL returns 201 (not 200) on successful location token exchange. Accept both 200 and 201 as success responses. Co-Authored-By: Paperclip --- internal/ghl/oauth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/ghl/oauth.go b/internal/ghl/oauth.go index 003e684..6f5fd0b 100644 --- a/internal/ghl/oauth.go +++ b/internal/ghl/oauth.go @@ -344,7 +344,7 @@ func (h *OAuthHandler) exchangeForLocationToken(ctx context.Context, companyAcce if err != nil { return nil, err } - if resp.StatusCode != http.StatusOK { + if resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusCreated { return nil, fmt.Errorf("locationToken endpoint returned %d: %s", resp.StatusCode, string(body)) }