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
Parameter | Type | Description |
---|---|---|
$id | string | The id of the Integration to update |
$name | string | The display name to apply to the Integration |
$type | string | The type of the Integration. Currently only oAuth2 is supported |
$config | IntegrationConfiguration | The configuration settings for the Integration |
returns | Integration | The updated Integration |
IntegrationConfiguration
IntegrationConfiguration
Name | Type | Description |
---|---|---|
clientId | string | Client ID of the OAuth Application |
clientSecret | string | Client Secret of the OAuth Application |
tokenPath | string | Token Path of the OAuth Application |
revokePath | string | Token Revocation Path of the OAuth Application |
authorizeBaseUrl | string | The base URL of the OAuth Application |
site | string | The website of the OAuth Application |
scopes | array | The list of Scopes to apply to Connections using the Integration |
useBodyAuth | boolean | Boolean 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;
Updated about 3 years ago