postIntegrationsByProviderConnectWithHttpInfo method
Acquires the org's credential for one provider.
Acquires the org's credential for one provider. It has TWO paths and the REQUEST picks which: a "token" key in the body seals that credential directly (verify-before-store), and its absence begins the 3-legged OAuth flow — minting a single-use nonce plus an HMAC-signed state that binds this org to this provider, and answering with the provider's authorize URL for the caller to redirect to. Fail-closed order, unchanged: no principal → 403; unknown provider → 404; an AdminOnly connector without the caller's own-org admin bit → 403; not configured → 503; KMS not ready → 503 (the flow WILL need to seal a token, so refuse now rather than dead-end at the callback).
Note: This method returns the HTTP Response.
Parameters:
Implementation
Future<Response> postIntegrationsByProviderConnectWithHttpInfo(String provider, ConnectIn connectIn,) async {
// ignore: prefer_const_declarations
final path = r'/v1/integrations/{provider}/connect'
.replaceAll('{provider}', provider);
// ignore: prefer_final_locals
Object? postBody = connectIn;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}