How to Generate and Use an Access Token in Swagger UI for ESET APIs

How to Generate and Use an Access Token in Swagger UI for ESET APIs

InfoSwagger is an open-source software framework that helps developers design, build, document, and consume RESTful Web services. Using the Swagger UI, you can interact directly with live APIs through a web-based interface, making it easier to test and understand how the APIs work.

Info
When working with ESET APIs, authentication is required before you can make calls to protected endpoints. This process involves generating an access token through the Authentication API in Swagger UI. The access token will then be used to authorize your API requests.

Step 1: Open Swagger UI for Authentication

  1. Navigate to the following URL:
  2. This page displays the available authentication methods under the OAuth section.

A screenshot of a computer

AI-generated content may be incorrect.


Step 2: Authenticate the API User

Before generating an access token, ensure that you have created a dedicated API user in your ESET Business Account (EBA) or ESET Protect Hub (EPH) with the necessary permission sets.

  1. In the ESET Connect – Oauth section of Swagger UI, click Try it out.

  1. Enter the credentials of the API user you created in your EBA or EPH:
    • Username: The email address of the API user.
    • Password: The password assigned to that API user.

A screenshot of a computer

AI-generated content may be incorrect.

  1. Execute the request by clicking Execute.

A screenshot of a computer

AI-generated content may be incorrect.

 

Step 3: Retrieve the Access Token

Once the request is executed successfully:

  • The Response Body will display a JSON object.
  • Locate the field "access_token". This is your access token, which serves as the authentication and authorization credential for protected API endpoints.

 


InfoAccess Tokens: An access token is issued by the authentication server (via OAuth 2.0) after the client application provides valid credentials. This token confirms the user’s identity and grants access to protected resources for a limited duration.

Step 4: Use the Access Token for API Calls

With your access token, you can now call other APIs available in Swagger UI.

Example: Using the Installer Management API

  1. At the top of Swagger UI, select Installer Management from the Select a definition dropdown menu.

  1. Click Authorize.

A screenshot of a computer

AI-generated content may be incorrect.

 

  1. Type Bearer and <your-access-token> (Replace <your-access-token> with the actual token retrieved in Step 3.) Then click Authorize.

A screenshot of a computer

AI-generated content may be incorrect.

  1. Select any available method under Installer Management, such as creating or retrieving installers.
    • Carefully review the required parameters and instructions for each method.

A group of colorful lines

AI-generated content may be incorrect.

  1. Click Try it outExecute.

A white rectangular object with a white stripe

AI-generated content may be incorrect.

A screenshot of a computer

AI-generated content may be incorrect.

  1. The results will appear in the Response Body section.

A screenshot of a computer

AI-generated content may be incorrect.

InfoIf you encounter errors such as 400 (Bad Request) or 403 (Forbidden), please refer to the official ESET documentation on error codes:
https://help.eset.com/eset_connect/en-US/error_codes.html

 

 

 

 

 

 

 

 

 

 





 


    • Related Articles

    • Download, install and activate ESET Cyber Security

      Issues Install ESET Cyber Security version 7 Solution Install ESET Cyber Security version 7 Uninstall any previously installed antivirus software on your system. Download version 7 of ESET Cyber Security and double-click the appropriate installer ...
    • Activate ESET home and small office products for Windows using the Activation key

      If you skipped activation during the installation, follow the steps below: Open the main program window of your ESET Windows product. When the product activation screen appears, click Use a purchased activation key. Figure 1-1 Type or copy/paste your ...
    • ESET Bridge (ESET Proxy) Configuration

      ESET Bridge requirements and supported products: https://help.eset.com/ebe/4/en-US/?requirements_and_supported_products.html Installation on Windows (standalone installer) Install ESET Bridge on a computer running a supported OS. 1.Visit the ESET ...
    • Enable, Create, and Edit Web Control Rules - ESET Protect

      Enable and edit Web control Endpoint users: Perform these steps on individual client workstations Open ESET PROTECT On-Prem in your web browser and log in. Click Policies and select the Built-in policy that you want to modify. Select the check box ...
    • Reset a Managed User's Full Disk Encryption Password Issue

      Issue ESET Endpoint Encryption (EEE) Client and EEE Server are separate products from ESET Full Disk Encryption (EFDE) The article below applies only to the EEE Client or EEE Server and not EFDE. Visit What's new in ESET Full Disk Encryption to view ...