Logo
Search
Docs

Partner end user oauth url

GET https://app.sulus.ai/api/partner-end-user/oauth/authorize-url

Build the GoHighLevel OAuth / marketplace installation URL

Authentication

Send a bearer token created on your dashboard's Developer page:

Authorization: Bearer <YOUR_API_KEY>

Query parameters

return_to string Optional Nullable Default: /

Path to return to after install (stored in encrypted OAuth state).

return_origin string Optional Nullable

Origin override; otherwise derived from the reseller / request host.

Errors

StatusMeaningBody
400 No reseller context on the request {"success":false,"message":"No reseller context found"}
404 Reseller row missing {"success":false,"message":"Reseller not found"}
403 Feature ghl_connect not enabled for the account {"message":"This feature is not enabled for your account. Please contact your administrator.","feature":"ghl_connect"}
400 Installation URL not configured for this environment {"success":false,"message":"GHL end-user OAuth is not configured. Set GHL_END_USER_INSTALLATION_URL in .env."}
500 Unexpected failure building the URL {"success":false,"message":"Error building OAuth URL"}

Notes

  • The Connect UI calls this with return_to pointing at the Connect page.
  • state is an encrypted payload (reseller, optional user_id, return_to, return_origin, nonce, issued_at).
curl --request GET \
  --url https://app.sulus.ai/api/partner-end-user/oauth/authorize-url \
  --header 'Authorization: Bearer <YOUR_API_KEY>'
import requests

url = "https://app.sulus.ai/api/partner-end-user/oauth/authorize-url"
headers = {"Authorization": "Bearer <YOUR_API_KEY>"}

response = requests.get(url, headers=headers)
print(response.json())
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	url := "https://app.sulus.ai/api/partner-end-user/oauth/authorize-url"
	req, _ := http.NewRequest("GET", url, nil)
	req.Header.Add("Authorization", "Bearer <YOUR_API_KEY>")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
Response 200
{
    "success": true,
    "data": {
        "url": "https://marketplace.example.com/oauth/chooselocation?response_type=code&redirect_uri=https%3A%2F%2Fapp.sulus.ai%2Fapi%2Fadmin%2Fpartner-end-user%2Foauth%2Fcallback&state=eyJpdiI6Li4uIn0%3D"
    }
}