I'm having an issue connecting to the api using th...
# suitetalkapi
d
I'm having an issue connecting to the api using the PHP SDK. I had everything working, searching the api and submitting a sales order, but when I reset my password, the process broke. I download the latester version of the PHP SDK, version 2020_2, but the issues persists. The error doesn't give me a clue on how to fix it, here it is:
*Fatal error*: Uncaught SoapFault exception: [<soapenv:Server.userException>] The request could not be understood by the server due to malformed syntax. in /var/www/vhosts/shop.geistlich-na.com/httpdocs/tools/netsuite/PHPToolkit/NSPHPClient.php:296 Stack trace: #0 /var/www/vhosts/shop.geistlich-na.com/httpdocs/tools/netsuite/PHPToolkit/NSPHPClient.php(296): SoapClient->__soapCall('get', Array, NULL, Array) #1 /var/www/vhosts/shop.geistlich-na.com/httpdocs/tools/netsuite/PHPToolkit/NetSuiteService.php(157055): NSPHPClient->makeSoapCall('get', Object(GetRequest)) #2 /var/www/vhosts/shop.geistlich-na.com/httpdocs/tools/netsuite/outbound/add_order.php(8): NetSuiteService->get(Object(GetRequest)) #3 /var/www/vhosts/shop.geistlich-na.com/httpdocs/tools/netsuite/index.php(36): include('/var/www/vhosts...') #4 {main} thrown in */var/www/vhosts/shop.geistlich-na.com/httpdocs/tools/netsuite/PHPToolkit/NSPHPClient.php* on line *296*
I have a feeling it is something that I'm forgetting to set properly. In my config file, I'm sending the NS_CONSUMER_KEY, NS_CONSUMER_SECRET, NS_TOKEN, NS_TOKEN_SECRET and verified those values are correct.
define("NS_ENDPOINT", "2020_2"); define("NS_HOST", "<https://5478095.suitetalk.api.netsuite.com>");  define("NS_ACCOUNT", "5478095");
Could it be the NS_ACCOUNT value? The documentation says to use my account id, but I'm already sending that as part of the host.