# Cumulocity MQTT bootstrap credentials

**URL:** <https://community.cumulocity.com/t/cumulocity-mqtt-bootstrap-credentials/709>\
**Category:** Forum\
**Tags:** cumulocity\
**Created:** [May 15, 2019, 3:20pm UTC](https://community.cumulocity.com/t/cumulocity-mqtt-bootstrap-credentials/709 "2019-05-15T15:20:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Niels\_Tjornhoj-Thomsen](https://avatars.discourse-cdn.com/v4/letter/n/f14d63/32.png) [@Niels\_Tjornhoj-Thomsen](https://community.cumulocity.com/u/Niels_Tjornhoj-Thomsen)\
**Post date:** [May 15, 2019, 3:20pm UTC](https://community.cumulocity.com/t/cumulocity-mqtt-bootstrap-credentials/709/1 "2019-05-15T15:20:32Z")

</div>

The guides ([https://cumulocity.com/guides/reference/smartrest-two/](https://cumulocity.com/guides/device-sdk/mqtt/#device-integration)) say that I have to contact [support@cumulocity.com](mailto:support@cumulocity.com) to get hold of the static user credentials. But all that I get from that email address is a bounce saying it is no longer active.

How do I get hold of the static user credentials then?

---

<div class="post-metadata">

**Author:** ![Niels\_Tjornhoj-Thomsen](https://avatars.discourse-cdn.com/v4/letter/n/f14d63/32.png) [@Niels\_Tjornhoj-Thomsen](https://community.cumulocity.com/u/Niels_Tjornhoj-Thomsen)\
**Post date:** [May 15, 2019, 5:14pm UTC](https://community.cumulocity.com/t/cumulocity-mqtt-bootstrap-credentials/709/2 "2019-05-15T17:14:30Z")

</div>

I’ve tried management/devicebootstrap as the username (as per the MQTT cheat sheet) but I just get a “Bad username of password” reply.

This is pretty fundamental, for anyone wanting to use the trial…

This is my test code (node.js):

const mqtt = require( “mqtt” )  
const opts\_bootstrap = {  
username: ‘management/devicebootstrap’,  
clientId: ‘TEST’  
}  
const client = mqtt.connect( ‘mqtt://mqtt.cumulocity.com’, opts\_bootstrap );

---

<div class="post-metadata">

**Author:** ![Michael\_Welsing](https://avatars.discourse-cdn.com/v4/letter/m/3e96dc/32.png) [@Michael\_Welsing](https://community.cumulocity.com/u/Michael_Welsing)\
**Post date:** [June 4, 2019, 1:21pm UTC](https://community.cumulocity.com/t/cumulocity-mqtt-bootstrap-credentials/709/3 "2019-06-04T13:21:39Z")

</div>

Hi Niels,

for the static MQTT device credentials API, please use the following credentials:

- Host: [mqtt.cumulocity.com](http://mqtt.cumulocity.com)
- User: management/devicebootstrap
- Password: Fhdt1bb1f

best regards  
Michael

---

<div class="post-metadata">

**Author:** ![Uwe\_Konig](https://avatars.discourse-cdn.com/v4/letter/u/ecb155/32.png) [@Uwe\_Konig](https://community.cumulocity.com/u/Uwe_Konig)\
**Post date:** [September 15, 2020, 3:16pm UTC](https://community.cumulocity.com/t/cumulocity-mqtt-bootstrap-credentials/709/4 "2020-09-15T15:16:53Z")

</div>

Hey,

sry for reviving this old topic, but why create a new one for an already existing topic?  
So here is my question: Im using this client ([GitHub - TyrManuZ/cumulocity-python-agent: A simple python agent connecting to Cumulocity via MQTT](https://github.com/TyrManuZ/cumulocity-python-agent)) but i cant get it working. I guess i messed up the credentials somehow. I have them like this:

[secret]  
c8y.bootstrap.tenant = [mqtt.cumulocity.com](http://mqtt.cumulocity.com)  
c8y.bootstrap.user = management/devicebootstrap  
c8y.bootstrap.password = Fhdt1bb1f

[mqtt]  
url = \<\>  
port = 1883  
ping.interval.seconds = 60

[agent]  
main.loop.interval.seconds = 10

the logs im getting show this:

2020-09-15 16:57:47,165 DEBUG Bootstrap connected with result code: 4  
2020-09-15 16:57:50,786 DEBUG poll credentials  
2020-09-15 16:57:55,791 DEBUG poll credentials  
2020-09-15 16:58:00,797 DEBUG poll credentials  
…

First of all… what is the meaning of code 4?  
And second, what did i miss?

Would be nice if anyone could help me 🙂

Greetings Uwe

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/system/32/31990_2.png) [@system](https://community.cumulocity.com/u/system)\
**Post date:** [April 2, 2021, 3:42pm UTC](https://community.cumulocity.com/t/cumulocity-mqtt-bootstrap-credentials/709/5 "2021-04-02T15:42:46Z")

</div>


