Gateway does not accept the "Bot" prefix

(#64) Bug Closed: Fixed 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

5 comments

Sign in with Fluxer to comment and vote.
Comment by Rex
RexSystem 1 vote edited
Status changed from Fixed to Awaiting confirmation
This may be fixed in the current version. If it still happens for you, please say so here.
Comment by Rex
RexSystem 1 vote
Status changed from Awaiting confirmation to Fixed
Imported from GitHub, fix shipped. Closed in bulk.
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!