RecaptchaEnterprise Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
RecaptchaClient
@interface
RecaptchaClient
:
NSObject
Interface to interact with reCAPTCHA.
-
Executes reCAPTCHA on a user action.
It is suggested the usage of 10 seconds for the timeout. The minimum value
is 5 seconds.
Declaration
Swift
func
execute
(
withAction
action
:
RecaptchaAction
,
withTimeout
timeout
:
Double
)
async
throws
->
String
Objective-C
-
(
void
)
execute
:(
RecaptchaAction
*
_Nonnull
)
action
withTimeout
:(
double
)
timeout
completion
:
(
nonnull
void
(
^
)(
NSString
*
_Nullable
,
NSError
*
_Nullable
))
completion
;
Parameters
action
|
The user action to protect.
|
timeout
|
Timeout for execute in milliseconds.
|
completion
|
Callback function to return the execute result.
|
-
Executes reCAPTCHA on a user action.
This method throws a timeout exception after 10 seconds.
Declaration
Swift
func
execute
(
withAction
action
:
RecaptchaAction
)
async
throws
->
String
Objective-C
-
(
void
)
execute
:(
RecaptchaAction
*
_Nonnull
)
action
completion
:
(
nonnull
void
(
^
)(
NSString
*
_Nullable
,
NSError
*
_Nullable
))
completion
;
Parameters
action
|
The user action to protect.
|
completion
|
Callback function to return the execute result.
|
-
Deprecated
Use method execute(withTimeout:completionHandler) instead
Executes reCAPTCHA on a user action.
This method throws a timeout exception after 10 seconds.
Parameters
action
|
The user action to protect.
|
completionHandler
|
Callback function to return the execute result.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-05-14 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-05-14 UTC."],[],[],null,["# RecaptchaEnterprise Framework Reference\n\nRecaptchaClient\n===============\n\n @interface RecaptchaClient : NSObject\n\nInterface to interact with reCAPTCHA.\n- `\n ``\n ``\n `\n\n ### [-execute:withTimeout:completion:](#/c:objc(cs)RecaptchaClient(im)execute:withTimeout:completion:)\n\n `\n ` \n Executes reCAPTCHA on a user action.\n\n It is suggested the usage of 10 seconds for the timeout. The minimum value\n is 5 seconds. \n\n #### Declaration\n\n Swift \n\n func execute(withAction action: ../Classes/RecaptchaAction.html, withTimeout timeout: Double) async throws -\u003e String\n\n Objective-C \n\n - (void)execute:(../Classes/RecaptchaAction.html *_Nonnull)action\n withTimeout:(double)timeout\n completion:\n (nonnull void (^)(NSString *_Nullable, NSError *_Nullable))completion;\n\n #### Parameters\n\n- `\n ``\n ``\n `\n\n ### [-execute:completion:](#/c:objc(cs)RecaptchaClient(im)execute:completion:)\n\n `\n ` \n Executes reCAPTCHA on a user action.\n\n This method throws a timeout exception after 10 seconds. \n\n #### Declaration\n\n Swift \n\n func execute(withAction action: ../Classes/RecaptchaAction.html) async throws -\u003e String\n\n Objective-C \n\n - (void)execute:(../Classes/RecaptchaAction.html *_Nonnull)action\n completion:\n (nonnull void (^)(NSString *_Nullable, NSError *_Nullable))completion;\n\n #### Parameters\n\n[Deprecated APIs and properties.\n-------------------------------](#/Deprecated-APIs-and-properties.)\n\n- `\n ``\n ``\n `\n\n ### [-execute:completionHandler:](#/c:objc(cs)RecaptchaClient(im)execute:completionHandler:)\n\n `\n ` \n Deprecated\n\n Use method execute(withTimeout:completionHandler) instead \n Executes reCAPTCHA on a user action.\n\n This method throws a timeout exception after 10 seconds. \n\n #### Declaration\n\n Swift \n\n func execute(_ action: ../Classes/RecaptchaAction.html) async -\u003e (../Classes/RecaptchaToken.html?, ../Classes/RecaptchaError.html?)\n\n Objective-C \n\n - (void)execute:(../Classes/RecaptchaAction.html *_Nonnull)action\n completionHandler:\n (nonnull void (^)(../Classes/RecaptchaToken.html *_Nullable,\n ../Classes/RecaptchaError.html *_Nullable))completionHandler;\n\n #### Parameters"]]