postIntegrationsByProviderVerify method
Re-checks a CONNECTED apikey connector's stored credential against the provider, live (hanzo connector verify).
Re-checks a CONNECTED apikey connector's stored credential against the provider, live (hanzo connector verify). Org-scoped (any member may check status); the credential is read from KMS, verified, and NEVER returned or logged. A verification failure is reported as {active:false}, not an error — the console/ CLI renders it. Only apikey providers support verify (OAuth tokens are checked at use, not re-verified here).
Parameters:
- String provider (required): Provider is the registry id of the connector — "slack", "github", "cloudflare". Unknown ids are 404, as are the user-plane (/v1/integrations/connectors) providers, which this surface never resolves.
Implementation
Future<VerifyOut?> postIntegrationsByProviderVerify(String provider,) async {
final response = await postIntegrationsByProviderVerifyWithHttpInfo(provider,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'VerifyOut',) as VerifyOut;
}
return null;
}