Losant-MQTT python lib

A time ago I used losant-mqtt lib in python to send data to a specific device in my application. The lib used to work well, but then I’ve stopped the application for some weeks and days ago I’ve come back with this old project, but now I cant’ use the lib. I get some erros in my code, where the first image shows the code running in my industry device and the second one shows the code running in my pc.


  1. my device is running in my private company white label application.
  2. we dont have a whitelabel python mqtt lib, so I’ve used the losant-mqtt. My company needs to buy a new feature to get this lib ported? Using rest instead, is a good alternative?
  3. hope you understand, I’ve wrote this message without google translate hehe.

@Igo_Monteiro can you verify that the device and access key you are using to connect still exists in your Losant application? “Invalid Losant credentials” tells me that the device and/or access key may have been deleted, or that the access key has been marked “inactive”.

It is possible that this application was deleted after migrating your application to a private installation; if so, you will need to adjust the Python library to connect to the private installation’s MQTT broker instead.