I'm not sure if it's the right Channel but lets tr...
# suitescript
s
I'm not sure if it's the right Channel but lets try. I created a Restlet. I've set up the connection. I go in Postman, run it and I get the data. Everything is fine. I take the curl and put it in Angular, .Net, PHP, GO and I'm always getting the same error INVALID_LOGIN_ATTEMPT. Any one has an idea ?
m
You can't just take the curl from postman. You have to calculate a new signature based on the current time stamp and an unused nonce.
s
just to be sure. I run it in Postman, take the "authorisation" from curl, and post it on .Net, In a matter of seconds
m
If you already sent the request through postman the nonce has been used
s
Good point. Now I have to find the trick to generate a nonce
Any idea how to create a nonce in Netsuite ?
Looking on the web now
I'm reading, it will never work for me. The app needs to run in China.... I'll try to use User based not Auth
Can I call a restlet without auth ?
m
A nonce is just a random number, not hard to generate.
The fun is creating a signature
Are you trying to call the restlet from within NetSuite? Then you can use
https.requestRestlet
s
Yes, I know. I had to do it for Amazon. Miserable. I will change to User Based. I needed did it but should be simple