OAuth 2.0 “… malformed syntax”

I am trying to communicate with an OAuth 2.0 integration record per this youtube video : How to Set Up and Integrate Rest APIs in NetSuite – YouTube

I have configured postman like in the video, though I am using ..<companyid>-sb1.. in my url instead of a production url.  I am receiving the following error :

The request could not be understood by the server due to malformed syntax

This is my request :

https://<companyid>-sb1.app.netsuite.com/app/login/oauth2/authorize.nl?response_type=code&redirect_uri=https%3A%2F%2F<companyid>-sb1.restlets.api.netsuite.com%2Fapp%2Fsite%2Fhosting%2Frestlet.nl%3Fscript%3D1076%26deploy%3D1&scope=RESTlet&state=<64characterstatestring>>&client_id=<cliendidfromintegrationrecord>

I haven’t found anything on suiteanswers, just looking for a solution to get a 200 response.

 

OAuth 2.0

Rookie Asked on November 27, 2020 in SuiteScript.
Add Comment
1 Answer(s)

Go through Request Parameters for Step 1. You want to correctly match the scope values.

Keep in mind that I believe you are better off doing TBA. The refresh token you get by completing the OAuth 2 flow expires in 7 days, requiring you to complete the flow again to get a new one.

Advanced Answered on November 27, 2020.

Hey, thanks! Yes the scope should have been “restlets” not “restlet”. Now I just have to figure out getting the user/roles setup I think.

on November 30, 2020.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   Limebox   Become a Sponsor   Become a Sponsor