Change the API calls timeout and other arguments

To adjust the timeout for all Automator API calls:

add_filter( 'automator_api_call', function( $params ) {
	$params['timeout'] = 30; // <<< Adjust the timeout to suit your needs
	return $params;
} );

To adjust the timeout for a specific endpoint:

add_filter( 'automator_facebook_api_call', function( $params ) {
	$params['timeout'] = 30; // <<< Adjust the timeout to suit your needs
	return $params;
} );

add_filter( 'automator_twitter_api_call', function( $params ) {
	$params['timeout'] = 30; // <<< Adjust the timeout to suit your needs
	return $params;
} );

List of valid endpoints:

  • slack
  • twitter
  • google
  • mailchimp
  • facebook
  • facebook-group
  • credits
  • report
  • zoom
  • hubspot
  • active-campaign
  • twilio
  • linkedin

Other request arguments can also be adjust using these filters.

It is also possible to adjust arguments for calls to specific API actions:

add_filter( 'automator_slack_post_message_api_call', function( $params ) {

        // Disable SSL verification
	$params['sslverify'] = false; 

        // Add custom text to all Slack messages
        $params['body']['message']['text'] .= ' Sent by Uncanny Automator :)'; 

	return $params;
} );