Update an Integration

Update an existing custom Integration by ID. Every update request must include the application authentication parameters.

Method Signature

update(string $id, string $name, string $type, array $config): Integration

Parameters

ParameterTypeDescription
$idstringThe id of the Integration to update
$namestringThe display name to apply to the Integration
$typestringThe type of the Integration. Currently only oAuth2 is supported
$configIntegrationConfigurationThe configuration settings for the Integration
returnsIntegrationThe updated 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
scopesarrayThe 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 updating an existing custom Integration
 */

require_once(__DIR__ . './vendor/autoload.php');

use Catalytic\SDK\CatalyticClient;

$catalytic = new CatalyticClient();
$config = array(
  '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' => array('read', 'write'),
  'useBodyAuth' => false
);
$integration = $catalytic->integrations()->update('1234', 'My Custom Integration', 'OAuth2', $config);

echo $integration->getName() . ":" . PHP_EOL;