Create an Integration

Create a custom Integration with which Connections can be created. To create a new Integration, you must provide your own application authentication parameters.

πŸ“˜

Learn More about Custom Integrations

https://help.catalytic.com/docs/custom-integrations/

Method Signature

Integration create(String name, IntegrationConfiguration oauthConfig);

Parameters

ParameterTypeDescription
nameStringThe display name to apply to the Integration
typeStringThe type of the integration. Currently only oAuth2 is supported
oauthConfigIntegrationConfigurationThe oauth configuration settings for the integration
returnsIntegrationThe created Integration

IntegrationConfiguration

NameTypeDescription
clientIdStringClient ID of the OAuth Application
clientSecretStringClient Secret of the OAuth Application
tokenPathStringToken Path of the OAuth Application
revokePathStringToken Revocation Path of the OAuth Application
authorizeBaseUrlStringThe base URL of the OAuth Application
siteStringThe website of the OAuth Application
scopesList<String>The list of Scopes to apply to Connections using the Integration
useBodyAuthBooleanBoolean indicating whether auth params should be sent to OAuth app in body

Example


/*
 * This example demonstrates creating a custom Integration
 */

import org.catalytic.sdk.CatalyticClient;
import org.catalytic.sdk.entities.Integration;
import org.catalytic.sdk.entities.IntegrationConfiguration;

public class Program {
  
    public static void main(String[] args) throws Exception {
      	
      	// Create and initialize the Catalytic SDK Client
    	CatalyticClient catalytic = new CatalyticClient();
        
        IntegrationConfiguration oauthConfig = new IntegrationConfiguration(
            "myOauthId",
            "myOauthSecret",
            "/token",
            "/revoke",
            new URI("https://example.com/"),
            new URI("https://example.com/oauth"),
            Arrays.asList("read", "write")
        );

      	// Create a new oauth Integration
      	Integration integration = catalytic.integrations().create("Example Integration", oauthConfig);
        
        System.out.println("Integration name: " + integration.getName());
    }
}