# Cannot publish/subscribe to my device up/down link topics

**URL:** <https://www.thethingsnetwork.org/forum/t/cannot-publish-subscribe-to-my-device-up-down-link-topics/37923>\
**Category:** v2 Backend\
**Created:** [June 18, 2020, 10:29pm UTC](https://www.thethingsnetwork.org/forum/t/cannot-publish-subscribe-to-my-device-up-down-link-topics/37923 "2020-06-18T22:29:32Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![arjanvanb](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/arjanvanb/32/46626_2.png) [@arjanvanb](https://www.thethingsnetwork.org/forum/u/arjanvanb)\
**Post date:** [June 19, 2020, 6:21am UTC](https://www.thethingsnetwork.org/forum/t/cannot-publish-subscribe-to-my-device-up-down-link-topics/37923/2 "2020-06-19T06:21:03Z")

</div>

> [@aaz1n19](#):
>
> ```javascript
> client.publish('appID/devices/MyDeviceName/down', 'Hello mqtt')
> 
> ```

You can only publish a message to the MQTT Data API to schedule a downlink. But that needs a structured JSON message with Base64 encoded binary data, not some text message like you’re showing. See [its documentation](https://www.thethingsnetwork.org/docs/applications/mqtt/api.html#downlink-messages). (And never use text messages in LoRaWAN, that’s just a waste of air time.)

So, you cannot use MQTT to simulate a device, if that’s what you’re after. Instead, see [How can I test my application by means of seeing the data at my HTTP integration](https://www.thethingsnetwork.org/forum/t/how-can-i-test-my-application-by-means-of-seeing-the-data-at-my-http-integration/37334).

Aside, please see [How do I format my forum post? [HowTo]](https://www.thethingsnetwork.org/forum/t/how-do-i-format-my-forum-post-howto/8735)

---

_[View the full topic](https://www.thethingsnetwork.org/forum/t/cannot-publish-subscribe-to-my-device-up-down-link-topics/37923)._
