# MQTT Relay Authorization Denied

**URL:** <https://community.tago.io/t/mqtt-relay-authorization-denied/1770>\
**Category:** Devices and Connectors\
**Created:** [October 16, 2025, 8:00am UTC](https://community.tago.io/t/mqtt-relay-authorization-denied/1770 "2025-10-16T08:00:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![khoza.valiantr](https://avatars.discourse-cdn.com/v4/letter/k/ac91a4/32.png) [@khoza.valiantr](https://community.tago.io/u/khoza.valiantr)\
**Post date:** [October 16, 2025, 8:00am UTC](https://community.tago.io/t/mqtt-relay-authorization-denied/1770/1 "2025-10-16T08:00:30Z")

</div>

Good day everyone, I am new to TagoIO, I’m on a free TagoIO account. I followed the tutorial on the official video [https://youtu.be/mKU73B24Osg](https://youtu.be/mKU73B24Osg) on this topic. I keep getting the error:  
`[2025-10-16T07:45:55Z INFO info] Config file loaded successfully`  
`[2025-10-16T07:45:55Z INFO network] Verifying network token for relay: self-hosted`  
`[2025-10-16T07:45:56Z ERROR network] Failed to verify network token for relay self-hosted: Status: 400 Bad Request, Body: {“status”:false,“message”:“Authorization denied”}, Message: Request failed with status: 400 Bad Request`  
`[2025-10-16T07:45:56Z ERROR network] Failed to verify relay self-hosted: Status: 400 Bad Request, Body: {“status”:false,“message”:“Authorization denied”}, Message: Request failed with status: 400 Bad Request`

This happens when I try to start the relay.

What is the common cause for this?

---

<div class="post-metadata">

**Author:** ![mateus.silva](https://avatars.discourse-cdn.com/v4/letter/m/77aa72/32.png) [@mateus.silva](https://community.tago.io/u/mateus.silva)\
**Post date:** [October 16, 2025, 5:54pm UTC](https://community.tago.io/t/mqtt-relay-authorization-denied/1770/2 "2025-10-16T17:54:15Z")

</div>

Hello @khoza.valiantr

I tested all the steps described in the README.md from the repository [tago-io/mqtt-relay (v1.4.0)](https://github.com/tago-io/mqtt-relay/tree/1.4.0), following exactly the same procedure shown in the video, using a Free account — everything worked as expected with the EMQX.

The error message you’re seeing indicates that the **network token** you used is incorrect. Please review the section in the video between **minutes 3:21 and 4:52** to make sure you copied the token from the correct place.

Also, don’t forget to include the `authorization_token`.  
You can follow this documentation to generate it:  
👉 [Authorization Token Documentation](https://docs.tago.io/docs/tagoio/integrations/general/authorization)

Both values must be added to the file:

```bash
~/.config/.tagoio-mqtt-relay.toml

```

Let me know if you still face any issues after checking this.

---

<div class="post-metadata">

**Author:** ![khoza.valiantr](https://avatars.discourse-cdn.com/v4/letter/k/ac91a4/32.png) [@khoza.valiantr](https://community.tago.io/u/khoza.valiantr)\
**Post date:** [October 16, 2025, 6:25pm UTC](https://community.tago.io/t/mqtt-relay-authorization-denied/1770/3 "2025-10-16T18:25:14Z")

</div>

Hello Mateus,

Thank you so much. I figured the issue was also that I’m on the EU server so the API url on the docs is for the US server.

Much appreciate the help!

Thanks.

 ![signatureImage](https://canada1.discourse-cdn.com/flex034/uploads/tagoio1/original/2X/7/77d51f05ff467c6f4168f48f16cc1d8ffa8dea28.jpeg)

🎥Discover smart tech strategies for business growth – [Watch Advannotech on YouTube](https://youtu.be/iWihJMGjpqk)

---

<div class="post-metadata">

**Author:** ![mateus.silva](https://avatars.discourse-cdn.com/v4/letter/m/77aa72/32.png) [@mateus.silva](https://community.tago.io/u/mateus.silva)\
**Post date:** [October 16, 2025, 7:57pm UTC](https://community.tago.io/t/mqtt-relay-authorization-denied/1770/4 "2025-10-16T19:57:17Z")

</div>

Thank you, Valiant, for your feedback! I really appreciate it.

I’ve opened a pull request to improve the documentation in the repository, adding a note about the **URL region** in the credentials file.

> <https://github.com/tago-io/mqtt-relay/pull/9>
>
> \## What does PR do?
> 
> This PR adds documentation for TagoIO regional API endpoi…nts to help users configure the MQTT Relay for different geographic regions. The README now includes clear guidance on selecting the appropriate regional URL for United States East 1 and Europe West 1 deployments.
> 
> \### 📝 \*\*Documentation Updates\*\*
> 
> \- \*\*Regional endpoint options\*\* added to TOML configuration section
> \- \*\*Environment variable examples\*\* updated with regional URLs
> \- \*\*Clear formatting\*\* using comments to guide users in selecting their region:
> - 🇺🇸 United States East 1: \`https://api.us-e1.tago.io/\`
> - 🇪🇺 Europe West 1: \`https://api.eu-w1.tago.io/\`
> - 🌐 Default (US): \`https://api.tago.io\`
> 
> \### 🎯 \*\*Benefits\*\*
> 
> \- Users can easily identify and configure the correct regional endpoint
> \- Improves onboarding experience with explicit regional options
