Search code examples
netsuitephp-toolkit

Netsuite Token Based Authentication (TBA) with PHPToolkit?


Does anyone have a working sample using Token Based Authentication with the Netsuite PHP Toolkit (Version 2017_1)? I have it working with User/Request based authentication using the sample files but need to move over to token based. I have generated both the consumer and user-based keys, and the integration works with my user/password.

I keep getting the error of "Your connection has timed out. Please log in again." The keys generated are brand new. Does anyone have any trouble with this integration that sounds similar to this?


Solution

  • Try creating a new login passport before each request made to the NetSuite API.

    I work with C#, but had the same issue when I initially switched over to TBA. I have a method which creates the token passport and adds it to my NetSuite service object. I then call this method before each API call.

    I hope this helps!