While using POST request in POSTMAN ,this type of error may be raised. And GET request may function properly. The error in POST request can be resolved by following methods:
- Make sure API is correct.
- Set the key/pair values of the request’s HTTP Headers to “User-Agent : Mozilla/5.0” in the posting tool. The Suitelet will now register the request’s origin from a web browser and should now accept the anonymous request.
- Add Content-Type : application/json in the header