https://netsuiteprofessionals.com logo
#suitecommerce
Title
# suitecommerce
c

Chris

04/22/2022, 4:58 PM
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

Steve Goldberg

04/22/2022, 5:12 PM
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

Chris

04/22/2022, 5:18 PM
That fixed it. Thank you @Steve Goldberg
l

lukeabbott

05/17/2022, 12:00 PM
Thank you.
l

Lucas

05/25/2022, 5:39 PM
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??
10 Views