sclausen / ngx-mqtt

This library isn't just a wrapper around MQTT.js for angular. It uses observables and takes care of subscription handling and message routing.
https://sclausen.github.io/ngx-mqtt/
MIT License
186 stars 82 forks source link

Connection refused: Not authorized #57

Closed mohithkovela closed 6 years ago

mohithkovela commented 6 years ago

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Feature request
[x ] Documentation issue or request

Current behavior

I want to connect to IBM Watson Iot MQTT but it is not happening.

this is how my MQTT_SERVICE_OPTIONS look like.

MQTT_SERVICE_OPTIONS = { connectOnCreate: true, hostname: 'xxxxxx.messaging.internetofthings.ibmcloud.com', port: 8883, protocol: "wss", clientId: 'd:xxxxxx:yyyyyy:zzzzzzz', username: 'API_Key', password: 'API_Token' }; I am using it from Ionic 3 mobile application.

Expected behavior

I know that I am doing something wrong and this is not an Issue at your side but I just needed help.

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

Environment


ngx-mqtt version: X.Y.Z


- Broker 

Others:

sclausen commented 6 years ago

I'm really sorry, but I have to reject this issue. I have no clue how IBM Watson IoT works, but I don't think this library should cover configuration documentation for IoT platforms who use mqtt under the hood. If you want to know, how to connect please inspect their repository ibm-watson-iot/iot-java and see how they use mqtt.