NetSapiens icon

NetSapiens

Interact with the NetSapiens API

Actions477

Authentication/Access Token (Oauth - Username/Password) → Get Access Token After MFA Include Passcode

AI-generated

Summary

Generate an OAuth access token after multi‑factor authentication including passcode

Inputs

  • refreshOptions — Whether to bypass cached dropdown values and fetch fresh options
  • PostTokens_2__body (required) — JSON body containing the MFA passcode and other credentials for the token request

Output shape

a single access token response object

Returns the OAuth access token and associated metadata; errors are reported in the response body

Examples

Example 1: Obtain token after user submits passcode

Send PostTokens_2__body with { "passcode": "123456" }; leave refreshOptions false unless fresh values are needed

Example 2: Refresh cached dropdown before token request

Set refreshOptions to true to force fresh options, then send the body as usual

Example 3: Handle authentication failure

Check the response for error details; optionally retry with a new passcode

Links

Discussion