RE: Issues Generating a REST Web Services Signature

Anyone have any insight into creating the signature for a REST API SuiteQL signature?  I have one for authenticating and calling a RESTlet script, and it works just fine in my app, but when I try to call the REST API for a SuiteQL query, I keep getting signature errors.

Guessing I must be missing something obvious.  Changing the URLs to the SuiteQL ones keeps returning me error: “error=”token_rejected”, error_description=”Invalid login attempt.””…  But my TBA credentials work perfectly fine with a RESTlet URL instead…

I’m generating my signature using Crypto JS.

CharlesBastian Rookie Asked on December 9, 2020 in SuiteTalk.
Add Comment
3 Answers

Hi Charles,

While I don’t think I can provide an answer in Node I can provide an answer in Python as I too had a similar issue. Here’s a link to a sample code set I found in StackOverflow for Python referencing how to access the RESTlet API using Python. I tried using this sample code for REST Web Services and it did not work. Here are the pieces I had to update in order to successfully access REST Web Services API:

URL:  “” I’m sure you are using this but I figured it worth mentioning the slight differences in the URL just in case.

Nonce/Timestamp/Headers: I had to use Python library “oauthlib” in order to sign the request. This enabled me to mimic what was happening in Postman since all the official Netsuite docs reference using Postman but don’t mention anything about signing requests outside of Postman.


Once I implemented oauthlib I was able to successfully sign requests in a way that Netsuite REST Web Services wanted. I know this is rather generic but I hope this at least helps you down the right path.

Rookie Answered on December 10, 2020.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.