{"id":6243,"date":"2018-02-07T19:29:51","date_gmt":"2018-02-07T19:29:51","guid":{"rendered":"https:\/\/alt2.minisoft.com\/support\/?p=6243"},"modified":"2022-07-28T10:36:05","modified_gmt":"2022-07-28T17:36:05","slug":"configuring-netsuite-for-token-based-authentication","status":"publish","type":"post","link":"https:\/\/minisoft.com\/support\/configuring-netsuite-for-token-based-authentication\/","title":{"rendered":"Configuring NetSuite for Token-Based Authentication"},"content":{"rendered":"<p>NetSuite provides two methods of authentication for making web service calls: (1) user name and password, which requires a user name that can log into the NetSuite website; (2) token-based authentication, which allows multiple simultaneous web service calls. NetSuite strongly recommends the token-based authentication (TBA) method.<\/p>\n<p>Some setup is required for token-based authentication. The following web page describes well how to set it up:<\/p>\n<p><strong>Note:&nbsp;<\/strong>When you create the integration record and Access token ignore the step &#8220;<em>Copy\/paste them into corresponding fields in Pscore NetSuite connection dialog&#8221;.&nbsp;<\/em>This information will be used in eFORMz with the TBA Generator function<\/p>\n<p><a href=\"http:\/\/netsuiteexpert.in\/token-based-authentication-for-suitetalk\/\">http:\/\/netsuiteexpert.in\/token-based-authentication-for-suitetalk\/<\/a><\/p>\n<p>TBA requires several distinct pieces of information:<\/p>\n<p>1. Token ID and Token Secret &#8211; two 64-character alphanumeric strings identifying the token<br \/>\n2. Consumer Key and Consumer Secret &#8211; two 64-character alphanumeric strings identifying the &#8220;consumer&#8221; for the web service calls.<br \/>\n3. NetSuite account ID &#8211; this is found in Setup &gt; Integrations &gt; Web Service Preferences.<\/p>\n<p>The &#8220;Secret&#8221; half of the Token and Consumer pairs should be kept confidential. They are encrypted when eFORMz stores them for use in a project that will make NetSuite web service calls.<\/p>\n<h2>Adding Permissions to the Token Role<\/h2>\n<p>Part of setting up the Token, as described in the web page hyperlinked above, is setting up a Role that defines the capabilities of the token. This role must have various permissions added to it to perform the typical operations eFORMz does in NetSuite. For example, the following permissions may be required:<\/p>\n<p><a href=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2018\/02\/TBA1.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-6244\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2018\/02\/TBA1.png\" alt=\"\" width=\"703\" height=\"218\" srcset=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2018\/02\/TBA1.png 703w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2018\/02\/TBA1-300x93.png 300w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2018\/02\/TBA1-150x47.png 150w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2018\/02\/TBA1-250x78.png 250w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2018\/02\/TBA1-550x171.png 550w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2018\/02\/TBA1-580x180.png 580w\" sizes=\"(max-width: 703px) 100vw, 703px\" \/><\/a><\/p>\n<p>Under Transactions, add:<br \/>\n\u2022 Find Transaction<br \/>\n\u2022 Fulfill Orders<br \/>\n\u2022 Item Fulfillment<br \/>\n\u2022 Sales Order<\/p>\n<p><a href=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2018\/02\/TBA2.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-6245\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2018\/02\/TBA2.png\" alt=\"\" width=\"427\" height=\"207\" srcset=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2018\/02\/TBA2.png 427w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2018\/02\/TBA2-300x145.png 300w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2018\/02\/TBA2-150x73.png 150w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2018\/02\/TBA2-250x121.png 250w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2018\/02\/TBA2-371x180.png 371w\" sizes=\"(max-width: 427px) 100vw, 427px\" \/><\/a><\/p>\n<p>Under Lists, add:<br \/>\n\u2022 Items<\/p>\n<p><a href=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2018\/02\/TBA3.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-6246\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2018\/02\/TBA3.png\" alt=\"\" width=\"440\" height=\"571\" srcset=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2018\/02\/TBA3.png 440w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2018\/02\/TBA3-231x300.png 231w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2018\/02\/TBA3-116x150.png 116w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2018\/02\/TBA3-250x324.png 250w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2018\/02\/TBA3-139x180.png 139w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2018\/02\/TBA3-385x500.png 385w\" sizes=\"(max-width: 440px) 100vw, 440px\" \/><\/a><\/p>\n<p>Under Setup, add:<br \/>\n\u2022 Custom Body Fields<br \/>\n\u2022 Custom Column Fields<br \/>\n\u2022 Custom Entity Fields<br \/>\n\u2022 Custom Event Fields<br \/>\n\u2022 Custom Fields<br \/>\n\u2022 Custom Item Fields<br \/>\n\u2022 Custom Item Number Fields<br \/>\n\u2022 Custom Lists<br \/>\n\u2022 Custom Record Types<br \/>\n\u2022 Custom Transaction Fields<br \/>\n\u2022 Log in using Access Tokens<br \/>\n\u2022 Other Custom Fields<br \/>\n\u2022 Web Services<\/p>\n<h3>Important Troubleshooting Note<\/h3>\n<p>If you do a web service call to &#8220;Search&#8221; for an object, say a Sales Order, an Item Fulfillment, or an Item, and you have not yet added the &#8220;Transactions&#8221; and &#8220;List&#8221; permissions noted above, the web service will return with a success code (200), but there will be zero records in the results. Only when you do a &#8220;Get&#8221; operation on an object (Sales Order, Item Fulfillment, or Item, etc.) does it return an error message indicating that you need to add permissions to that object in order to retrieve data for it in a web service call.<\/p>\n<p>In order to see the error message for a NetSuite web service call (or any web service call, for that matter), you should add the following argument to the Java VM:<\/p>\n<pre>-DWS.RETURN.ERRORS=\"true\"<\/pre>\n<p>For example, if your eFORMz.ini file contained the following:<\/p>\n<pre>.\\bin\\javaw.exe -mx1024M -ms128M<\/pre>\n<p>Then add the argument to the end of the line so that it appears like this:<\/p>\n<pre>.\\bin\\javaw.exe -mx1024M -ms128M -DWS.RETURN.ERRORS=\"true\"<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>NetSuite provides two methods of authentication for making web service calls: (1) user name and password, which requires a user name that can log into the NetSuite website; (2) token-based authentication, which allows multiple simultaneous web service calls. NetSuite strongly recommends the token-based authentication (TBA) method. Some setup is required for token-based authentication. The following [&hellip;]<\/p>\n","protected":false},"author":75,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[106],"tags":[107,125],"_links":{"self":[{"href":"https:\/\/minisoft.com\/support\/wp-json\/wp\/v2\/posts\/6243"}],"collection":[{"href":"https:\/\/minisoft.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/minisoft.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/minisoft.com\/support\/wp-json\/wp\/v2\/users\/75"}],"replies":[{"embeddable":true,"href":"https:\/\/minisoft.com\/support\/wp-json\/wp\/v2\/comments?post=6243"}],"version-history":[{"count":5,"href":"https:\/\/minisoft.com\/support\/wp-json\/wp\/v2\/posts\/6243\/revisions"}],"predecessor-version":[{"id":10401,"href":"https:\/\/minisoft.com\/support\/wp-json\/wp\/v2\/posts\/6243\/revisions\/10401"}],"wp:attachment":[{"href":"https:\/\/minisoft.com\/support\/wp-json\/wp\/v2\/media?parent=6243"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/minisoft.com\/support\/wp-json\/wp\/v2\/categories?post=6243"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/minisoft.com\/support\/wp-json\/wp\/v2\/tags?post=6243"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}