Pipes provides OAuth integrations with third-party providers that allow your users to securely connect their accounts to your application. Pipes handles the complete OAuth lifecycle including token refresh and credential storage.
Read more in the Pipes guide.
Creates or updates a client-credentials-based installation for the specified integration and user. If an installation already exists, the stored client credentials are rotated to the new values.
cURL
| curl --request PUT \ | |
| --url "https://api.workos.com/data-integrations/salesforce/client-credentials" \ | |
| --header "Authorization: Bearer sk_example_123456789" \ | |
| --header "Content-Type: application/json" \ | |
| -d @- <<'BODY' | |
| { | |
| "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT", | |
| "client_id": "3MVG9...", | |
| "client_secret": "shhh-secret" | |
| } | |
| BODY |
| require "workos" | |
| WorkOS.configure do |config| | |
| config.api_key = "sk_example_123456789" | |
| end | |
| WorkOS.client.pipes.update_data_integration_client_credentials( | |
| slug: "salesforce", | |
| user_id: "user_01EHZNVPK3SFK441A1RGBFSHRT", | |
| client_id: "3MVG9...", | |
| client_secret: "shhh-secret" | |
| ) |
| from workos import WorkOSClient | |
| client = WorkOSClient(api_key="sk_example_123456789", client_id="client_123456789") | |
| client.pipes.update_data_integration_client_credentials( | |
| slug="salesforce", | |
| user_id="user_01EHZNVPK3SFK441A1RGBFSHRT", | |
| client_id="3MVG9...", | |
| client_secret="shhh-secret", | |
| ) |
| package main | |
| import ( | |
| "context" | |
| "github.com/workos/workos-go/v9" | |
| ) | |
| func main() { | |
| client := workos.NewClient("sk_example_123456789") | |
| _, err := client.Pipes().UpdateDataIntegrationClientCredentials(context.Background(), "salesforce", &workos.PipesUpdateDataIntegrationClientCredentialsParams{ | |
| UserID: "user_01EHZNVPK3SFK441A1RGBFSHRT", | |
| ClientID: "3MVG9...", | |
| ClientSecret: "shhh-secret", | |
| }) | |
| if err != nil { | |
| panic(err) | |
| } | |
| } |
| <?php | |
| use WorkOS\WorkOS; | |
| $workos = new WorkOS( | |
| apiKey: "sk_example_123456789", | |
| clientId: "client_123456789", | |
| ); | |
| $workos | |
| ->pipes() | |
| ->updateDataIntegrationClientCredentials( | |
| slug: "salesforce", | |
| userId: "user_01EHZNVPK3SFK441A1RGBFSHRT", | |
| clientId: "3MVG9...", | |
| clientSecret: "shhh-secret", | |
| ); |
| import com.workos.WorkOS; | |
| import com.workos.pipes.PipesApi.UpdateDataIntegrationClientCredentialsOptions; | |
| WorkOS workos = new WorkOS("sk_example_123456789"); | |
| UpdateDataIntegrationClientCredentialsOptions options = | |
| UpdateDataIntegrationClientCredentialsOptions.builder() | |
| .userId("user_01EHZNVPK3SFK441A1RGBFSHRT") | |
| .clientId("3MVG9...") | |
| .clientSecret("shhh-secret") | |
| .build(); | |
| workos.pipes.updateDataIntegrationClientCredentials("salesforce", options); |
| using WorkOS; | |
| var client = new WorkOSClient(new WorkOSOptions { | |
| ApiKey = "sk_example_123456789", | |
| ClientId = "client_123456789", | |
| }); | |
| await client.Pipes.UpdateDataIntegrationClientCredentialsAsync("salesforce", | |
| new PipesUpdateDataIntegrationClientCredentialsOptions { | |
| UserId = "user_01EHZNVPK3SFK441A1RGBFSHRT", | |
| ClientId = "3MVG9...", | |
| ClientSecret = "shhh-secret", | |
| }); |
| use workos::Client; | |
| use workos::pipes::UpdateDataIntegrationClientCredentialsParams; | |
| #[tokio::main] | |
| async fn main() -> Result<(), workos::Error> { | |
| let client = Client::builder() | |
| .api_key("sk_example_123456789") | |
| .client_id("client_123456789") | |
| .build(); | |
| let _result = client | |
| .pipes() | |
| .update_data_integration_client_credentials( | |
| "salesforce", | |
| UpdateDataIntegrationClientCredentialsParams { | |
| user_id: "user_01EHZNVPK3SFK441A1RGBFSHRT".into(), | |
| client_id: "3MVG9...".into(), | |
| client_secret: "shhh-secret".into(), | |
| ..Default::default() | |
| } | |
| ) | |
| .await?; | |
| Ok(()) | |
| } |
| { | |
| "object": "connected_account", | |
| "id": "data_installation_01EHZNVPK3SFK441A1RGBFSHRT", | |
| "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT", | |
| "organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT", | |
| "scopes": [], | |
| "auth_method": "client_credentials", | |
| "state": "connected", | |
| "created_at": "2024-01-16T14:20:00.000Z", | |
| "updated_at": "2024-01-16T14:20:00.000Z" | |
| } |
Feature flagged
PUT/data-integrations /:slug /client-credentials
Parameters
Returns
Provider Continue to the next section
Up next