connectIntegration
Sets up a new integration and assigns it to a brand.
This mutation connects a new integration for the provided brand.
Authentication Requirements
- Header
Authorizationmust be provided
Integration Connection Process
- Checks a previous integration connection was requested
- Extracts and validates the connection request metadata
- Creates a new integration with a unique ID
- Encrypts and stores authentication credentials (
api_key,api_secret,api_token,oauth_token) - Assigns specified roles to determine integration permissions
- Associates the integration with the specified brand
- Configures management settings (managed vs user-managed)
Credential Storage
All authentication credentials are automatically encrypted before storage:
api_key: Main API key or primary connection credentialapi_secret: API secret for authenticationapi_token: Additional API tokenoauth_token: Shopify OAuth token (for Shopify integrations)
Role Assignment
The integration must be assigned at least one role from the available role types. Roles determine the permissions and actions the integration can perform.
Behavior
Upon successful execution, returns the created integration with all configured settings. The integration will be ready for use according to its assigned roles and permissions.
Possible Errors
GraphQL::ExecutionError- when required headers are missingValidationError- when required arguments are missing or invalidAuthenticationError- when authentication credentials are invalidPermissionError- when user lacks permission to create integrations
**Permissions required:** Company and brand access
connectIntegration(
input: ConnectIntegrationInput!
): Integration!
Arguments
connectIntegration.input ● ConnectIntegrationInput! non-null input
Parameters for ConnectIntegration