I’ve got quite a bit of experience with the Infusionsoft API. But I’ve ran into a situation I can’t seem to solve.
I’m trying to send an email via the API and I’m getting an error.
Here’s a dump of the data I’m passing in the call as well as the error coming back:
[0]=>
array(1) {
[0]=>
int(1433)
}
[1]=>
string(21) "tyler.garns@gmail.com"
[2]=>
string(15) "~Contact.Email~"
[3]=>
string(0) ""
[4]=>
string(0) ""
[5]=>
string(4) "HTML"
[6]=>
string(11) "Testing 123"
[7]=>
string(18) "Email Content HEre"
[8]=>
string(0) ""
}
fXmlRpc\Exception\ResponseException: Failed to parse XML-RPC request: Unknown type: nil in /var/www/html/vendor/lstrojny/fxmlrpc/src/fXmlRpc/Exception/ResponseException.php:33 Stack trace: #0 /var/www/html/vendor/lstrojny/fxmlrpc/src/fXmlRpc/Client.php(162): fXmlRpc\Exception\ResponseException::fault(Array) #1 /var/www/html/vendor/infusionsoft/php-sdk/src/Infusionsoft/Http/InfusionsoftSerializer.php(32): fXmlRpc\Client->call('APIEmailService...', Array) #2 /var/www/html/vendor/infusionsoft/php-sdk/src/Infusionsoft/Infusionsoft.php(387): Infusionsoft\Http\InfusionsoftSerializer->request('https://api.inf...', 'APIEmailService...', Array, Object(fXmlRpc\Client)) #3 /var/www/html/vendor/infusionsoft/php-sdk/src/Infusionsoft/Api/APIEmailService.php(101): Infusionsoft\Infusionsoft->request('APIEmailService...', Array, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) #4 /var/www/html/wp-content/plugins/webrtc-aws-upload/send-video.php(128): Infusionsoft\Api\APIEmailService->sendEmail(Array) #5 /var/www/html/wp-content/plugins/insert-php/insert_php.php(48) : eval()'d code(2): include('/var/www/html/w...') #6 /var/www/html/wp-content/plugins/insert-php/insert_php.php(48): eval() #7 /var/www/html/wp-includes/class-wp-hook.php(298): will_bontrager_insert_php('[insert_php]\r\ni...') #8 /var/www/html/wp-includes/plugin.php(203): WP_Hook->apply_filters('[insert_php]\r\ni...', Array) #9 /var/www/html/wp-includes/post-template.php(240): apply_filters('the_content', '[insert_php]\r\ni...') #10 /var/www/html/wp-content/themes/astra/template-parts/content-page.php(30): the_content() #11 /var/www/html/wp-includes/template.php(690): require('/var/www/html/w...') #12 /var/www/html/wp-includes/template.php(647): load_template('/var/www/html/w...', false) #13 /var/www/html/wp-includes/general-template.php(167): locate_template(Array, true, false) #14 /var/www/html/wp-content/themes/astra/page.php(35): get_template_part('template-parts/...', 'page') #15 /var/www/html/wp-includes/template-loader.php(74): include('/var/www/html/w...') #16 /var/www/html/wp-blog-header.php(19): require_once('/var/www/html/w...') #17 /var/www/html/index.php(17): require('/var/www/html/w...') #18 {main}
Any ideas what I’m doing wrong here?
Thanks.