getKnowledgeConnectorsByProviderConnect method
StartConnectorOAuth returns the provider authorize URL the console opens to connect this org's account.
StartConnectorOAuth returns the provider authorize URL the console opens to connect this org's account. There is no server-side redirect — the console stays in control of the navigation. The URL carries a state this server SIGNED over the caller's validated org, so the connection the callback completes can only ever land in that org.
Parameters:
- String provider (required): Provider is the connector to act on: github, slack, google or notion.
Implementation
Future<KbAuthorizeOut?> getKnowledgeConnectorsByProviderConnect(String provider,) async {
final response = await getKnowledgeConnectorsByProviderConnectWithHttpInfo(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), 'KbAuthorizeOut',) as KbAuthorizeOut;
}
return null;
}