Refresh Token POST Request to the Token Endpoint and Request to the Logout Endpoint

Refresh Token POST Request to the Token Endpoint

When the access token expires, the application can send the refresh token POST request to the token endpoint to get a new access token.

The format of the URL is:

‘https://<accountID>.suitetalk.api.netsuite.com/services/rest/auth/oauth2/v1/token’

where <accountID> represents your NetSuite account ID.

Request Parameters for the Refresh Token Request

  • grant_type: The value of the grant_type parameter is refresh_token
  • refresh_token : The value of the refresh_token parameter is in JSON Web Token (JWT) format.

in Authorization gave Type as basic Auth and Client ID & Secret as Username and Password.

Send Request

Will get new access token after expiration

Request to the Logout Endpoint

The application sends a GET or POST request to the logout endpoint to revoke the valid id token and its associated access and refresh tokens. This endpoint has the following format:

‘https://<accountID>.suitetalk.api.netsuite.com/services/rest/auth/oauth2/v1/logout’

where <accountID> represents your NetSuite account ID.

Request Parameters for the Logout Token Request

id_token_hint : The value of the id_token_hint parameter is the value of the id token that the application revokes.

The request to the logout endpoint also invalidates active session of NetSuite.

Leave a comment

Your email address will not be published. Required fields are marked *