Skip to content

Latest commit

 

History

History
62 lines (43 loc) · 3.93 KB

README.md

File metadata and controls

62 lines (43 loc) · 3.93 KB

ValidateConnection

(Vault.ValidateConnection)

Overview

Available Operations

  • State - Validate Connection State

State

This endpoint validates the current state of a given connection. This will perform different checks based on the connection auth type. For basic and apiKey auth types, the presence of required fields is checked. For connectors that implement OAuth2, this operation forces the refresh flow for an access token regardless of its expiry.

Note:

  • Do not include any credentials in the request body. This operation does not persist changes, but only triggers the validation of connection state.
  • If a refresh token flow was performed and successful, the new access token will then be used for subsequent API requests.

Example Usage

using ApideckUnifySdk;
using ApideckUnifySdk.Models.Components;
using ApideckUnifySdk.Models.Requests;

var sdk = new Apideck(
    apiKey: "<YOUR_BEARER_TOKEN_HERE>",
    consumerId: "test-consumer",
    appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX"
);

VaultValidateConnectionStateRequest req = new VaultValidateConnectionStateRequest() {
    ServiceId = "pipedrive",
    UnifiedApi = "crm",
};

var res = await sdk.Vault.ValidateConnection.StateAsync(req);

// handle response

Parameters

Parameter Type Required Description
request VaultValidateConnectionStateRequest ✔️ The request object to use for the request.

Response

VaultValidateConnectionStateResponse

Errors

Error Type Status Code Content Type
ApideckUnifySdk.Models.Errors.BadRequestResponse 400 application/json
ApideckUnifySdk.Models.Errors.UnauthorizedResponse 401 application/json
ApideckUnifySdk.Models.Errors.PaymentRequiredResponse 402 application/json
ApideckUnifySdk.Models.Errors.NotFoundResponse 404 application/json
ApideckUnifySdk.Models.Errors.UnprocessableResponse 422 application/json
ApideckUnifySdk.Models.Errors.APIException 4XX, 5XX */*