NetSapiens icon

NetSapiens

Interact with the NetSapiens API

Actions477

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

AI-generated

Summary

Obtain an OAuth2 access token using a supplied authorization code

Inputs

  • refreshOptions — Whether to bypass cached dropdown values and fetch fresh options

Output shape

a single token response object containing the access token, token type, expires_in and optional refresh token fields

The response is returned as JSON; if the server returns an error the body includes an error description, but successful calls always return a token object

Examples

Example 1: Retrieve token after a user submits an auth code in a web form

NetSapiens node, operation Get Access Token from Auth Code, set Refresh Dropdown Cache to false, feed the auth code into the required input, execute

Example 2: Refresh token automatically when the cached dropdown is stale

Enable Refresh Dropdown Cache, provide auth code, run Get Access Token from Auth Code to get a fresh token

Example 3: Handle token retrieval failure in a retry loop

Call Get Access Token from Auth Code with default settings, check the error envelope in subsequent workflow steps

Links

Discussion