---
title: "Authorize Salesforce"
method: GET
path: "/oauth/salesforce/authorize"
tags: ["salesforce-oauth"]
---

# Authorize Salesforce

`GET /oauth/salesforce/authorize`

## Request

- Base URL: `https://api.klavis.ai`
- URL: `https://api.klavis.ai/oauth/salesforce/authorize`
- Auth: none declared

Start Salesforce OAuth flow

Parameters:
- instance_id: Identifier for the instance requesting authorization
- client_id: Optional client ID for white labeling
- scope: Optional scopes to request (space-separated)
- redirect_url: Optional URL to redirect to after authorization completes
- instance_url: Optional Salesforce instance URL for sandbox or custom domains

## Query parameters

- `instance_id` string, required: Unique identifier for the client instance requesting authorization
- `client_id` string, nullable: Client ID for white labeling, if not provided will use default credentials
- `scope` string, nullable: Optional OAuth scopes to request (space-separated string)
- `redirect_url` string, nullable: Optional URL to redirect to after authorization completes
- `instance_url` string, nullable: Salesforce instance URL (e.g., https://mycompany.salesforce.com). If not provided, will use default login.salesforce.com

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

## Changes

- **2026-02-08** `d70b82139caa`: 2 info
  - added the optional property `detail/items/ctx` to the response with the `422` status
  - added the optional property `detail/items/input` to the response with the `422` status

[Operation history](https://skmtc.dev/klavis-ai/apis/klavis-ai-https-www-klavis-ai/changes/oauth/salesforce/authorize/get.md)

---

[API](https://skmtc.dev/klavis-ai/apis/klavis-ai-https-www-klavis-ai.md) - [All operations](https://skmtc.dev/klavis-ai/apis/klavis-ai-https-www-klavis-ai/llms.txt) - [OpenAPI document](https://skmtc.dev/klavis-ai/apis/klavis-ai-https-www-klavis-ai/revisions/1f05ced7280f?raw)
