Python SDK
import json
import os
from parable_types_web_api import ConnectorOAuthStartInput
from parable_web_api_sdk import ClientConfig, WebApiSDK
sdk = WebApiSDK(
ClientConfig(
base_url=os.environ["PARABLE_API_URL"],
auth_token=os.environ["PARABLE_API_TOKEN"],
default_headers={"X-Tenant": os.environ["PARABLE_WORKSPACE"]},
)
)
input_data = ConnectorOAuthStartInput.model_validate(
json.loads("{\"tenantConnectorId\":\"550e8400-e29b-41d4-a716-446655440000\",\"clientId\":\"example\",\"clientSecret\":\"example\",\"redirectUri\":\"https://example.com\"}"),
)
result = sdk.connectors.connector_oauth_start(input_data)sdk, err := webapisdk.New(webapisdk.SDKConfig{
BaseURL: os.Getenv("PARABLE_API_URL"),
Auth: &webapisdk.AuthConfig{Token: os.Getenv("PARABLE_API_TOKEN")},
RequestInterceptor: func(ctx context.Context, req *http.Request) error {
req.Header.Set("X-Tenant", os.Getenv("PARABLE_WORKSPACE"))
return nil
},
})
if err != nil {
return err
}
var input webapitypes.ConnectorOAuthStartInput
if err := json.Unmarshal([]byte(`{"tenantConnectorId":"550e8400-e29b-41d4-a716-446655440000","clientId":"example","clientSecret":"example","redirectUri":"https://example.com"}`), &input); err != nil {
return err
}
result, err := sdk.ConnectorsNamespace.ConnectorOAuthStart(ctx, input){
"data": {
"authorizeUrl": "<string>"
},
"meta": {
"requestId": "<string>",
"totalCount": 123
},
"links": {
"first": "<string>",
"last": "<string>",
"next": "<string>",
"prev": "<string>"
}
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}Start a Provider OAuth sign-in
Starts the OAuth 2.0 authorization code flow for a Provider connection in this Workspace and returns the Provider’s authorization URL. The same person opens the URL in a browser within 10 minutes. redirectUri is the Parable app’s Provider OAuth callback page, which completes the flow and saves the credentials. Send your OAuth application’s clientId and clientSecret. After the first sign-in, the saved secret is used when clientSecret is empty. Requires permission to manage Provider connection secrets.
POST
/
api
/
connectors
/
connector-oauth-start
Python SDK
import json
import os
from parable_types_web_api import ConnectorOAuthStartInput
from parable_web_api_sdk import ClientConfig, WebApiSDK
sdk = WebApiSDK(
ClientConfig(
base_url=os.environ["PARABLE_API_URL"],
auth_token=os.environ["PARABLE_API_TOKEN"],
default_headers={"X-Tenant": os.environ["PARABLE_WORKSPACE"]},
)
)
input_data = ConnectorOAuthStartInput.model_validate(
json.loads("{\"tenantConnectorId\":\"550e8400-e29b-41d4-a716-446655440000\",\"clientId\":\"example\",\"clientSecret\":\"example\",\"redirectUri\":\"https://example.com\"}"),
)
result = sdk.connectors.connector_oauth_start(input_data)sdk, err := webapisdk.New(webapisdk.SDKConfig{
BaseURL: os.Getenv("PARABLE_API_URL"),
Auth: &webapisdk.AuthConfig{Token: os.Getenv("PARABLE_API_TOKEN")},
RequestInterceptor: func(ctx context.Context, req *http.Request) error {
req.Header.Set("X-Tenant", os.Getenv("PARABLE_WORKSPACE"))
return nil
},
})
if err != nil {
return err
}
var input webapitypes.ConnectorOAuthStartInput
if err := json.Unmarshal([]byte(`{"tenantConnectorId":"550e8400-e29b-41d4-a716-446655440000","clientId":"example","clientSecret":"example","redirectUri":"https://example.com"}`), &input); err != nil {
return err
}
result, err := sdk.ConnectorsNamespace.ConnectorOAuthStart(ctx, input){
"data": {
"authorizeUrl": "<string>"
},
"meta": {
"requestId": "<string>",
"totalCount": 123
},
"links": {
"first": "<string>",
"last": "<string>",
"next": "<string>",
"prev": "<string>"
}
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}Access
This operation needs a Parable token. An MCP token cannot call it. See Authentication for the kinds of token. Your roles must granttenant.connectors.secrets.
Errors
HTTP 400: The connection does not use the OAuth 2.0 authorization code flow, redirectUri is not the Parable OAuth callback page, or clientId is missing. Use an OAuth connection, the callback page address, and your OAuth application client ID.HTTP 404: The Provider connection was not found in this Workspace. Check the connection identifier.
Authorizations
Headers
Body
application/json