Same request works in curl, so something a'int rig...
# suitescript
b
Same request works in curl, so something a'int right in the authValue. Any insight appreciated.
m
Try hitting an echo service to see what's actually being sent
👍 1
Copy code
https.get({
  url: "<https://yadayada.com/data>",
  headers: {
    'Authorization': https.createSecureString({ input: "Bearer {custsecret_my_secret}"}),
    'Accept': 'application/json'
   }
})
b
I tried that too, but I'll try again to be sure...
omg, I had the req url in the secret field instead of the token secret 🤦 "args": {}, "headers": { "x-forwarded-proto": "https", "x-forwarded-port": "443", "host": "www.postman-echo.com", "x-amzn-trace-id": "Root=1-62183c86-1c2ef7ad0480cc80474e86d0", "accept": "application/json", "authorization": "Bearer https://platform.brexapis.com/v2/accounts/cash", "user-agent": "NetSuite/2021.2 (SuiteScript)", "accept-encoding": "gzip, deflate" }, "url": "https://www.postman-echo.com/get"{ }
Thanks @michoel!
m
🙃
b
working now 🙌