Netsuite RESTlet returning INVALID_REQUEST response

225 Views Asked by At

I have set up proper client credentials and access token with Oauth1.0 in my headers to authenticate using Token Based Authentication to my Netsuite Restlet but I am getting a 400 error response back:

error code: INVALID_REQUEST
error message: The request could not be understood by the server due to malformed syntax.

What do I need to change in my request to prevent this invalid request.

Here is my Module Spec in my RESTlet file:

/**
 * @NApiVersion 2.1
 * @NScriptType Restlet
 * @NModuleScope SameAccount
 */
1

There are 1 best solutions below

0
Eric Stermer On

After doing some discovery, I was able to find some information from MuleSoft here that was helpful to understanding what I was doing wrong.

I was using postman to test my endpoint but I needed to update my header encryption from HMAC-SHA1 to HMAC-SHA256.

Quoting the NetSuite documentation:

In 2021.1 no new solutions using HMAC-SHA1 signature method can be created. As of 2021.2, HMAC-SHA1 signature method will not be supported. You must update your solutions to use HMAC-SHA256 signature method before your account is upgraded to 2021.2.