Documentation Index
Fetch the complete documentation index at: https://docs.getmembrane.com/llms.txt
Use this file to discover all available pages before exploring further.
Custom connector parameters allow you to override or extend the integration’s default connector configuration on a per-connection basis. These are developer-provided values that customize how the connector behaves for specific connections.
Use Cases
Common use cases for custom connector parameters include:
- Custom OAuth scopes for specific connection needs
- Dynamic environment selection if you want to programmatically decide whether to use sandbox/prod environment without asking user.
- Having different versions of connector behavior for different connections that don’t require user input.
Important Notes
- Custom connector parameters are developer-provided, not user-editable fields
- They are stored with the connection and used for all API calls through that connection
- They take precedence over the integration’s default connector parameters
- They are optional - connections work without them using default integration settings
Method 1: Using ui.connect()
When you want to open the connection UI with custom connector parameters:
await membrane.ui.connect({
integrationKey: 'hubspot',
allowMultipleConnections: true,
connectorParameters: {
scopes: ['contacts', 'deals', 'companies'], // Custom OAuth scopes
},
})
Method 2: Using connect()
For programmatic connection creation with custom parameters:
const connection = await membrane.integration('hubspot').connect({
input: {
// User-provided connection input
apiKey: 'user-api-key',
},
connectorParameters: {
// Developer-provided connector customizations
scopes: ['contacts', 'deals', 'companies'],
},
})
Method 3: Backend connection (no front-end SDK)
For backend-to-backend integrations or when not using the frontend SDK:
<form method="POST" action="https://api.getmembrane.com/connect" enctype="application/x-www-form-urlencoded">
<input
type="hidden"
name="payload"
value='{
"integrationId": "your-integration-id",
"input": {"apiKey": "user-api-key"},
"connectorParameters": {
"scopes": ["contacts", "deals", "companies"]
},
"redirectUri": "https://your-backend.com/integration/callback"
}'
/>
<button type="submit">Connect</button>
</form>