RE: OAuth2 / REST related questions

We are able to get an access_token and refresh_token via the OAuth2 flow

  1. We are not able to refresh an access token (we always receive invalid_request):

curl -X POST -H “Content-Type: application/x-www-form-urlencoded” -d “grant_type=refresh_token&refresh_token=XXXX&client_id=XXX&client_secret=XXXX” {“error”:”invalid_request”}


2. Is it possible to fetch invoice documents (like an invoice pdf) via the REST API?

3. How to refresh a refresh_token? It seems to expire after 7 days?

4. In our other OAuth applications we can use 1 integration/application that we register as a company. We can use the same client_id and client_secret and the same authorization + token urls for ALL our clients, it seems this is not possible for Netsuite?Thank you very much in advance.


We also have the same question as

“From what I’ve been able find in the Netsuite documentation, it seems that Netsuite’s implementation of OAuth 2.0 requires a manual re-authentication every 7 days when the refresh token expires. Is there any way to get around this limitation? I would like to be able to automate the retrieval of new refresh tokens so that an administrator only needs to set up the integration’s authentication once and the software integrating to Netsuite handles the rest.”

Thanks in advance

Laurens Rookie Asked on June 18, 2020 in SuiteTalk.
Add Comment
3 Answers

A couple of answers from @battk from slack:


battk  42 minutes ago

look at the important section for where to put the client id and client secret
battk  40 minutes ago

The same page also says what to do after the refresh token  expires, which is basically start over from step 1
battk  35 minutes ago

you will have to complete the authorization flow for each account, using a slightly different url for each one
Rookie Answered on June 18, 2020.
Add Comment

Your Answer

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