Hello,
I ran into a very weird issue where I was not authorized to connect to MQTT. I was able to narrow down the issue to my username, for some reason it did not work with my old username, but after changing it, it works flawlessly. Is there a limit on the username length for connecting to the MQTT server?
Adafruit.io MQTT not authorized to connect
Moderators: adafruit_support_bill, adafruit
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
- adafruit_support_mike
- Posts: 67446
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Adafruit.io MQTT not authorized to connect
[moved to the Adafruit.io forum]
- jwcooper
- Posts: 1004
- Joined: Tue May 01, 2012 9:08 pm
Re: Adafruit.io MQTT not authorized to connect
Did your old username have any special characters (non-alphanumeric)? If it was one of our legacy usernames (pre-2012), it could have had issues with mqtt as the rules weren't as strict on usernames back then.
Any username that conforms to the current limits at Adafruit should work OK now.
Any username that conforms to the current limits at Adafruit should work OK now.
- rsmith9945
- Posts: 2
- Joined: Mon Mar 01, 2021 6:57 pm
Re: Adafruit.io MQTT not authorized to connect
Hello jwcooper,jwcooper wrote:Did your old username have any special characters (non-alphanumeric)? If it was one of our legacy usernames (pre-2012), it could have had issues with mqtt as the rules weren't as strict on usernames back then.
Any username that conforms to the current limits at Adafruit should work OK now.
Yeah, that's the weird thing, my username was rserranosmith, which does not have any special characters. What is interesting is that after successfully testing it with my current username, rsmith9945, I changed it back to rserranosmith and tried to connect to the MQTT server again, and it still did not work, and so I've been using this current username. Very strange!
- oliviasmithh900
- Posts: 11
- Joined: Sat Mar 06, 2021 11:07 pm
Re: Adafruit.io MQTT not authorized to connect
May be there's time restriction on account, though its weird.rsmith9945 wrote:jwcooper wrote: Yeah, that's the weird thing, my username was rserranosmith, which does not have any special characters. What is interesting is that after successfully testing it with my current username, rsmith9945, I changed it back to rserranosmith and tried to connect to the MQTT server again, and it still did not work, and so I've been using this current username. Very strange!
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.