getRecaptchaConfig method

Future<GoogleCloudIdentitytoolkitV2RecaptchaConfig> getRecaptchaConfig({
  1. String? clientType,
  2. String? tenantId,
  3. String? version,
  4. String? $fields,
})

Gets parameters needed for reCAPTCHA analysis.

Request parameters:

clientType - reCAPTCHA Enterprise uses separate site keys for different client types. Specify the client type to get the corresponding key. Possible string values are:

  • "CLIENT_TYPE_UNSPECIFIED" : Client type is not specified.
  • "CLIENT_TYPE_WEB" : Client type is web.
  • "CLIENT_TYPE_ANDROID" : Client type is android.
  • "CLIENT_TYPE_IOS" : Client type is ios.

tenantId - The id of a tenant.

version - The reCAPTCHA version. Possible string values are:

  • "RECAPTCHA_VERSION_UNSPECIFIED" : The reCAPTCHA version is not specified.
  • "RECAPTCHA_ENTERPRISE" : The reCAPTCHA enterprise.

$fields - Selector specifying which fields to include in a partial response.

Completes with a GoogleCloudIdentitytoolkitV2RecaptchaConfig.

Completes with a commons.ApiRequestError if the API endpoint returned an error.

If the used http.Client completes with an error when making a REST call, this method will complete with the same error.

Implementation

async.Future<GoogleCloudIdentitytoolkitV2RecaptchaConfig> getRecaptchaConfig({
  core.String? clientType,
  core.String? tenantId,
  core.String? version,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (clientType != null) 'clientType': [clientType],
    if (tenantId != null) 'tenantId': [tenantId],
    if (version != null) 'version': [version],
    if ($fields != null) 'fields': [$fields],
  };

  const url_ = 'v2/recaptchaConfig';

  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return GoogleCloudIdentitytoolkitV2RecaptchaConfig.fromJson(
      response_ as core.Map<core.String, core.dynamic>);
}