Discordchatexporter: Make it work with bot token

Created on 18 Apr 2018  路  7Comments  路  Source: Tyrrrz/DiscordChatExporter

Currently it only accepts user tokens, but it would be great if you can make it work with bot tokens as well.

enhancement

Most helpful comment

This is scheduled for next release

All 7 comments

Im not experienced enough with .NET at all to provide a complete solution for this, but I was able to get it working with a bot token by adding the following line to the very start of DataService#GetStringAsync:

_httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bot", "BOT TOKEN HERE");

(Obviously replace BOT TOKEN HERE with the actual token)

Currently using this app puts your discord account at risk, as it's use goes against discord TOS. Making the same exact functionality except remove the ability to use a user token, and instead replace it with a bot token would greatly benefit the end users.

This is scheduled for next release

um where is DataService#GetStringAsync? I can not find it @yonilerner

@thisisjvgrace It looks like that method was removed in https://github.com/Tyrrrz/DiscordChatExporter/pull/63 The best equivalent now is probably DataService#GetApiResponseAsync, but I have not tested it, and do not have time to.

EDIT: Though, note that the Owner has said in this thread that this feature is planned for the next release anyway, so you may want to just hold tight for that

Hello, I'm using v2.20.0, and trying to use a bot token returns

Authentication token is invalid.

Thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Sakani17 picture Sakani17  路  3Comments

makeworld-the-better-one picture makeworld-the-better-one  路  3Comments

roger125 picture roger125  路  4Comments

calderJamNet picture calderJamNet  路  5Comments

chibiusagi picture chibiusagi  路  4Comments