Skip to content

Cookie preferences

We use cookies for our own analytics, to see how our campaigns perform and, if you allow it, to load the site search from Google. We never sell your data. Necessary cookies keep the site working and cannot be switched off. See our Cookie Policy for details and our Privacy Policy for how we handle personal data.

Security, load balancing and remembering your cookie choice.

Show us which pages people read, how they find the site and where they get stuck, so we can improve it (Google Analytics).

Remember the campaign or partner link you arrived from, so we know which campaign or partner brought you when you sign up or contact us (partner program). We do not use it to build advertising profiles.

Load the site search from Google when you use it. Google sets its own cookies and shows ads in the search results.

776 Try for free Menu

TBMQ live demo

Try TBMQ in your browser

A free account on our public broker. Open the TBMQ UI and connect your MQTT clients. No credit card required.

Rather run it yourself? Install on your own servers

User management

TBMQ is initialized with a default admin user (sysadmin@thingsboard.org / sysadmin). In production, create a dedicated admin user and either remove the default account or change its password.

All examples below use curl. Replace localhost:8083 with your server address if TBMQ is running remotely.

Obtain an access token by logging in:

Terminal window
curl --location --request POST 'http://localhost:8083/api/auth/login' \
--header 'Content-Type: application/json' \
--data-raw '{
"username":"sysadmin@thingsboard.org",
"password":"sysadmin"
}'

The response contains a token field. Export it for use in subsequent requests:

Terminal window
export ACCESS_TOKEN=PLACE_YOUR_TOKEN_HERE
Terminal window
curl --location --request GET "http://localhost:8083/api/admin?pageSize=50&page=0" \
--header "X-Authorization: Bearer $ACCESS_TOKEN"

Each user entity has a unique id that can be used to update or delete that user.

Terminal window
curl --location --request POST 'http://localhost:8083/api/admin' \
--header "X-Authorization: Bearer $ACCESS_TOKEN" \
--header 'Content-Type: application/json' \
--data-raw '{
"id":$USER_ID,
"email":"test@gmail.com",
"password":"test",
"firstName":"test",
"lastName":"test"
}'

If $USER_ID is null or the id field is absent, a new user is created. Otherwise, the user with the given ID is updated.

Terminal window
curl --location --request DELETE 'http://localhost:8083/api/admin/$USER_ID' \
--header "X-Authorization: Bearer $ACCESS_TOKEN"

Replace $USER_ID with the actual ID of the user you want to delete.