Trying to create new token and web url is opening ...
# suitecommerce
c
Trying to create new token and web url is opening to: https://system.netsuite.com/app/login/secure/authorizetoken.nl?oauth_token=undefined which produces and
unexpected error
. I ran into this awhile back but can't remember the solution. This is with the current set of Extension Tools.
s
SCA Developer Tools In the developer tools source code, open Commons\ns_npm_repository\oauth1\index.js and make the following change:
Copy code
// Find this
const hostnameStep1 = this.vm ? hostName : `rest${molecule}.<http://netsuite.com|netsuite.com>`;
 
// And replace it with this
const hostnameStep1 = this.vm ? hostName : `system${molecule}.<http://netsuite.com|netsuite.com>`;
Extension Developer Tools In the developer tools source code, open ns_npm_repository\oauth1\index.js and make the following change:
Copy code
// Find this
let hostnameStep1;
if (this.vm) {
    hostnameStep1 = hostName;
} else if (this.account) {
    hostnameStep1 = `${this.account}.restlets.api${molecule}.<http://netsuite.com|netsuite.com>`;
} else {
    hostnameStep1 = `rest${molecule}.<http://netsuite.com|netsuite.com>`;
}
 
// And replace it with this
const hostnameStep1 = this.vm ? hostName : `system${molecule}.<http://netsuite.com|netsuite.com>`;
👍🏻 1
👍 1
c
That fixed it. Thank you @Steve Goldberg
l
Thank you.
l
In my case I am able to authenticate, But on Command line It's giving me an Unexpected Error.. Don't know why? Do we need any specific Role for this? I mean permission??