Gateway does not accept the "Bot" prefix

(#64) Bug Awaiting confirmation api

Summary

A lot of Discord bot libraries expect bot tokens to be prefixed with "Bot " and will yield a validation error client-side if you do not prefix your tokens with "Bot". While Fluxer doesn't aim to be 1:1 compatible with Discord's API, supporting both would at least make it somewhat easier to port existing bots from libraries that do validation. (see: oceanic.js)

Steps to reproduce

  1. Attempt to authenticate with "Bot <TOKEN>"
  2. Get an authentication failure

4 comments

Sign in with Fluxer to comment and vote.
Comment by Rex
RexSystem 1 vote
Status changed from Fixed to Awaiting confirmation
This was closed in a bulk cleanup before Fluxer V2 without being checked or fixed. It may work now, so it is waiting for someone to confirm whether the bug still happens.
Comment by @Jiralite
RexSystem 1 vote originally by @Jiralite on GitHub
Hi there, your steps to reproduce is already the intended way to authenticate. This will work:
curl -X POST 'https://api.fluxer.app/v1/channels/1471528736695902215/messages' \
  -H 'Authorization: Bot <token>' \
  -H 'Content-Type: application/json' \
  --data-raw '{"content":"test"}'
{"id":"1472392856272232493","channel_id":"1471528736695902215","author":{"id":"1470599717535023175","username":"Terra","discriminator":"0737","global_name":null,"avatar":null,"avatar_color":null,"bot":true,"flags":0},"type":0,"flags":0,"content":"test","timestamp":"2026-02-15T00:43:32.671Z","edited_timestamp":null,"pinned":false,"mention_everyone":false,"embeds":[],"attachments":[],"stickers":[]}
Can you please send an example curl of what you are doing? It may be you have incorrect syntax somewhere?
Comment by @twnlink
RexSystem 1 vote originally by @twnlink on GitHub OP
This is specifically when connecting to the gateway as far as I can tell, the API accepts "Bot " but the gateway doesn't (?). I am currently attempting to use Oceanic.js to connect and it fails to specifically because the gateway does not seem to accept tokens prefixed with "Bot ".
Comment by @Jiralite
RexSystem 1 vote originally by @Jiralite on GitHub
Can confirm there is a discrepancy with the gateway. Thank you for the report!