Does anyone have an example of oauth 1 authenticat...
# suitescript
a
Does anyone have an example of oauth 1 authentication for NetSuite? I'm looking for something like :
Copy code
function postns(script, deployment, body){
...
return Promise<Json>}
and for get requests
Copy code
function getns(script, deployment, params){
 ...
 return Promise<Json>}
?
s
not sure, if you already expect return Promise, you're expecting the header call constructed perfectly right?
s
I don't understand that code.
are you trying to call from inside NS (suitescript) or from outside?
a
Outside.
s
I use something like this
Untitled.ts
(though actually only for POST - GET wasn't actually needed at the time
a
Where is the
Oauth
object defined?
s
import * as OAuth from 'oauth-1.0a'
uses the oauth-1.0a lib from npm
a
Ah thanks.