Skip to content
Leadtime
English
Esc
navigateopen⌘Jpreview

Create an OAuth connect URL for a native custom-agent MCP connection

Creates a browser OAuth login URL for one native custom-agent MCP connection. Use after saving the MCP row when the server authMode is oauth.

POST/agents/{id}/native/mcp-connections/{connectionId}/oauth-connect-url
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:write
or
AuthorizationBearer token (JWT) · headerrequired
Path parameters
idstringrequired
connectionIdstringrequired
Request body
requiredapplication/json
oauthClientIdobject
OAuth client id for advanced OAuth setup.
oauthClientSecretobject
OAuth client secret for advanced OAuth setup. Write-only.
returnUrlobject
Browser URL to return to after OAuth completes.
Responses
201
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
Request
curl -X POST "https://leadtime.app/api/public/agents/string/native/mcp-connections/string/oauth-connect-url" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "oauthClientId": {},
  "oauthClientSecret": {},
  "returnUrl": {}
}'
Response
No example response.