Skip to main content

Application Tokens REST API ⭐

2.5
Premium


This page describes how to use the Application Tokens REST API that is provided by the Management Center for the Pro Edition of Eclipse Mosquitto (MMC).

info

Before sending a command request, make sure that you have been authenticated.

info

Application Tokens REST API can be accessed only by the users with an admin role.

Application Tokens REST API Functionallity

Application Tokens Feature also provides an API to run CRUD operation on the tokens.

It features the following endpoints:

  • GET /api/tokens - get information about all the tokens

  • GET api/tokens/{tokenHash} - get information about a token specified by tokenHash

  • POST /api/tokens - create a new token

Example of the body for the POST request:

{
"name": "mytoken1",
"validUntil": "2025-06-08T10:54:53.000Z",
"role": "admin"
}

Possible role values: admin, editor, viewer, connectionManager, monitoringViewer

  • DELETE api/tokens/{tokenHash} - revoke a token specified by tokenHash
info

Note that if you have Single Sign-On plugin enabled, your initial admin application token has to be created from the GUI and only afterwards you can will be able to access Application Tokens REST API using this token

Swagger documentation

Application Tokens REST API is documented inside the internal MMC documentation, which can be accessed at /api/docs. There you will find more detailed information on how to use Application Tokens REST API.

image