---
title: "Create a CRM provider OAuth URL"
method: GET
path: "/api/integrations/crm/providers/{provider}/oauth-url"
tags: ["CRM"]
---

# Create a CRM provider OAuth URL

`GET /api/integrations/crm/providers/{provider}/oauth-url`

## Request

- Base URL: `https://api.setluca.com`
- URL: `https://api.setluca.com/api/integrations/crm/providers/{provider}/oauth-url`
- Auth: one of:
  - API key in cookie `luca.session_token`
  - API key in header `x-api-key`
  - HTTP bearer

Builds the provider's OAuth authorization URL for this workspace. The redirect URI has to be one we allow, or the request is rejected.

**API key scopes:** `integrations:write`.

## Path parameters

- `provider` 'gohighlevel' | 'hubspot' | 'activecampaign' | 'salesforce' | 'pipedrive', required

## Query parameters

- `redirectUri` string, uri
- `locationId` string

## Headers

- `Luca-API-Version` '1'

## Response `200`

ok

- CrmOAuthUrlResponse
  - `provider` 'gohighlevel' | 'hubspot' | 'activecampaign' | 'salesforce' | 'pipedrive', required
  - `authUrl` string, uri, required
  - `state` string, required
  - `requiredScopes` string[], required
  - `redirectUri` string, required

## Other responses

- `400`: bad request
- `401`: unauthorized
- `403`: forbidden
- `429`: rate limited
- `500`: internal error
- `503`: service unavailable

---

[API](https://skmtc.dev/setluca/apis/luca-api.md) · [All operations](https://skmtc.dev/setluca/apis/luca-api/llms.txt) · [OpenAPI document](https://skmtc.dev/setluca/apis/luca-api/revisions/90a200e4100b?raw)
