NetSapiens icon

NetSapiens

Interact with the NetSapiens API

Actions477

Authentication/Access Token (Oauth - Username/Password) → Get Access Token from Refresh

AI-generated

Summary

Refreshes an OAuth access token using stored credentials and returns the new token

Inputs

  • refreshOptions — Toggle to bypass cached token options and fetch fresh options
  • PostTokens__body — JSON body payload for the token request, typically containing grant_type and credentials

Output shape

a single access token JSON object

Includes token, expires_in, and other fields; empty on failure

Examples

Example 1: Refresh token cached, request new access token

refreshOptions=false; PostTokens__body={ "grant_type": "refresh_token", "client_id": "...", "client_secret": "...", "refresh_token": "..." }

Example 2: Force refresh by bypassing cache

refreshOptions=true; PostTokens__body unchanged

Example 3: Handle token expiration error

refreshOptions=false; PostTokens__body includes valid refresh token; operation returns new token or fails

Links

Discussion