The purpose of this article is to help users who are new to the Wisenet API understand how to authorise access and test API calls using Postman.
This article provides a practical, step-by-step guide to:
Importing a sample Postman collection for the Wisenet API
Completing the OAuth 2.1 authorisation code flow, including:
Building and opening the Authorise URL in a browser
Signing in and granting consent for the required scopes
Retrieving the authorisation code from the browser URL
Exchanging the authorisation code for access and refresh tokens
Storing the
access_token,refresh_token, andapi_keyas Postman variablesMaking a test API request (such as Get All Agents)
Refreshing the access token and re-running the API request
Step 1: Import the sample Postman collection
1
Download the sample Postman collection file
3
Step 2: Authorise (Open in Browser)
1
2
3
4
8
Retrieve the authorisation code
After authorisation, you will be redirected to a URL containing the authorisation code.
You can retrieve the code in one of two ways:
Option 1: Manually copy the
codevalue from the browser URLOption 2: Open the browser console and run the following command:
new URLSearchParams(window.location.search).get('code')
Copy the returned code value, excluding any single quotes.


















