Skip to main content
POST
/
api
/
servers
/
{server_id}
/
connect
Initiate OAuth connection
curl --request POST \
  --url https://{organization_id}.mcp.barndoor.ai/api/servers/{server_id}/connect \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{}'
{
  "auth_url": "https://login.salesforce.com/services/oauth2/authorize?..."
}

Authorizations

Authorization
string
header
required

JWT token obtained through Auth0 OAuth 2.0 flow with PKCE.

The token should be included in the Authorization header: Authorization: Bearer <your-jwt-token>

Use the Barndoor SDK's loginInteractive() function to obtain tokens automatically.

Path Parameters

server_id
string
required

Server UUID or slug

Query Parameters

return_url
string<uri>

Optional return URL after OAuth completion

Body

application/json

The body is of type object.

Response

Connection initiation successful

auth_url
string<uri>

OAuth authorization URL to redirect user to

Example:

"https://login.salesforce.com/services/oauth2/authorize?..."