42wim/matterbridge

Starting gateway failed: Bridge discord.account failed to start: HTTP 401 Unauthorized

Arhoc opened this issue · 3 comments

Describe the bug
Matterbridge cannot start

To Reproduce
Link discord to irc
Editing the matterbridge.toml with CORRECT TOKEN and running the executable

Expected behavior
Matterbridge running normally

Screenshots/debug logs
Without debug it shows:
[0001] FATAL main: Starting gateway failed: Bridge discord.account failed to start: HTTP 401 Unauthorized, {"message": "401: Unauthorized", "code": 0}

With --debug:
[0012] INFO discord: [Connect:bridge/discord/discord.go:70] Connecting
[0012] INFO discord: [Connect:bridge/discord/discord.go:83] Connection succeeded
[0012] DEBUG irc: [handleJoinPart:bridge/irc/handlers.go:117] handle girc.Event{Source:(girc.Source)(0xc000878120), Tags:girc.Tags{"time":"2024-01-04T02:49:40.138Z"}, Timestamp:time.Date(2024, time.January, 3, 20, 49, 40, 138000000, time.Local), Command:"JOIN", Params:[]string{"#gentoo", "", "Aidonee-Test"}, Sensitive:false, Echo:false}
[0012] DEBUG irc: [handleTopicWhoTime:bridge/irc/handlers.go:264] 333: Topic set by tdr [~tdr@user/tdr] [2023-12-13 20:10:08 -0600 CST]
[0013] FATAL main: [main:matterbridge.go:66] Starting gateway failed: Bridge discord.account failed to start: HTTP 401 Unauthorized, {"message": "401: Unauthorized", "code": 0}

Environment (please complete the following information):

  • OS: ArchLinux
  • Matterbridge version: version: 1.26.0 6dafebc

Additional context
[arhoc@ArchLinux matterbridge ]$ cat matterbridge.toml
[irc]
[irc.libera]
Server="irc.libera.chat:6667"
Nick="Aidonee-Test"

[discord]
[discord.account]
Token="mytoken"
Server="All Things Linux"

[general]
RemoteNickFormat="[{PROTOCOL}/{BRIDGE}] <{NICK}>"

[[gateway]]
name="Gateway"
enable=true

    [[gateway.inout]]
    account="discord.account"
    channel="general"

    [[gateway.inout]]
    account="irc.libera"
    channel="#gentoo"

I'm having a similar issue, except I know what's causing mine. I'm trying to use a selfbot to create a one-way discord -> IRC bridge. What I'd like to know is are you using a selfbot and is this your discord server? The reason I'm getting a 403 is because my selfbot doesn't have the permission to read server members intent updates, at least that's the only error it's giving now. If I was able to get around that, there might be another permission that needs to be taken care of.