Simple NodeJS app that call NetSuite RESTlet and get JSON data
- oauth-1.0a
- crypto-js
- axios
- clone repo
- do "npm install" in repo folder
- edit index.js with vim :) and fill consumerKey, consumerSecret, tokenId, tokenSecret, restletUrl, accountId
- run app with "node index.js"
- see your RESTlet returning data :)
- Go to Setup > Integration > Manage Integrations > New
- In name enter "NetSuite NodeJS Restlet Call App"
- Check "Token-Base Authentication" and uncheck all other checkboxes
- After succesfull Save write down "Consumer Key / Client" & "Consumer Secret / Client Secret"
- Create new role go to Setup > Users/Roles > Manage Roles > New
- Check "Web Services Only Role"
- On the Permissions tab
- Setup subtab
- Add "Integration Application"
- Add "Log in using Access Tokens"
- Add "User Access Tokens"
- ... any other needed permissions
- Setup subtab
- Click "Save"
- Add newly created role to your user
- Setup > Users / Roles > Manage Users
- Edit your User
- In "Access" tab add the role created in step 3
- Create Token ID / Token Secret
- Get Account ID / Realm
- Go to Setup > Integration > SOAP Web Services Preferences > Account ID
- Get Restlet UR
- With all this information entered in index.js you can now call your RESTlet with "node index.js"