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(IntegrationCreationRequest creationRequest);
async Task<Integration> CreateAsync(IntegrationCreationRequest creationRequest);

Parameters

ParameterTypeDescription
creationRequestIntegrationCreationRequestThe request containing Integration configuration metadata
returnsIntegrationThe requested Integration

IntegrationCreationRequest

NameTypeDescription
NamestringThe display Name to apply to the Integration
TypeIntegrationTypeThe Type of the Integration. Currently only OAuth2 is supported
ConfigIntegrationConfigurationThe configuration settings for the 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
AuthorizeBaseUrlUriThe base URL of the OAuth Application
SiteUriThe website of the OAuth Application
ScopesList<string>The list of Scopes to apply to Connections using the Integration
UseBodyAuthboolBoolean indicating whether auth params should be sent to OAuth app in body

Example

/*
 * This example demonstrates creating a custom Integration
 */
using Catalytic.Sdk.Entities;

namespace Catalytic.Sdk.Examples
{
    class Program
    {
        static void Main(string[] args)
        {
            var catalytic = new Catalytic.Sdk.CatalyticClient(AccessToken.Default);
            var request = new IntegrationCreationRequest {
                Name = "My Custom Integration",
                Type = IntegrationType.OAuth2,
                Config = new IntegrationConfiguration {
                    ClientId = "MY_OAUTH_CLIENT_ID",
                    ClientSecret = "MY_OAUTH_CLIENT_SECRET",
                    TokenPath = "/oauth2/token",
                    RevokePath = "/oauth2/revoke",
                    AuthorizeBaseUrl: "https://example-oauth-app.com/oauth2/authorize",
                    Site = "https://api.example-oauth-app.com",
                    Scopes = new List<string> { "read", "write" },
                    UseBodyAuth = false
                }
            };

            var integration = await catalytic.Integrations.CreateAsync(request);

            Console.WriteLine(integration.Name);
        }
    }
}