Description
The “gform_webapi_authentication_required_” plus ENDPOINT filter in Gravity Forms allows the overriding of authentication for all the endpoints of the Web API.
Usage
add_filter( 'gform_webapi_authentication_required_' . $endpoint, 'your_function_name' );
Parameters
- $authentication_required bool
Whether authentication is required for this endpoint.
Example
Force authentication for the POST forms/[ID]/submissions endpoint.
The following example forces the Gravity Forms Web API to authenticate the user before allowing the form to be POSTed.
add_filter( 'gform_webapi_authentication_required_post_forms_submissions', '__return_true' );
Placement
This code should be placed in the functions.php file of your active theme.
Source Code
This filter is located in GFWebAPI::handle_page_request() in includes/webapi/webapi.php