NetXMS Support Forum

English Support => General Support => Topic started by: Augusto on June 17, 2025, 06:53:07 PM

Title: Web API Authentication Question: Bearer Token vs. Session-Id
Post by: Augusto on June 17, 2025, 06:53:07 PM

I'm facing an issue with the Web API authentication on my setup (Ubuntu server with Tomcat 9).
I can authenticate and make API calls successfully when using a temporary session-id
obtained via the login endpoint. However, when I try to use a permanent API token (generated in the Management Console), I consistently get I consistently get error: 46 (NXSL_CLASS_NOT_FOUND)
My main question is: should authentication with permanent API tokens (Bearer Tokens) work as expected? Or for automation scripts, is the correct approach to always fetch a temporary Session-Id first?
Title: Re: Web API Authentication Question: Bearer Token vs. Session-Id
Post by: Filipp Sudanov on June 25, 2025, 04:39:11 PM
Tokens generated from Management Console are intended for different things - currently I think only for publishing network maps.
So yes, current way it to get temporarily session id.

UPD: actually permanent tokens are supported in the new API - the one that is server module and is currently under development. But not in the old one.