✅ Exception: Cannot add value because header 'Authorization' does not support multiple values.
This pops up in the command prompt even tho I have firmly checked that it is only one authorization value used. I have been stuck on this problem for at least 2 hours at this point and I am growing tired.
22 Replies
what command prompt is telling me

what im removing is my token, friend username and the channel id
so nothing important
im getting code in a second
this basically just replies to someone who msgd u on discord
so if u have discord on and ur asleep or something u can just put in a message containing "hi im asleep dm me tmr" or wtv
however it is not working because of this
and i do not know the root cause of the problem and ive tried debugging it and solving it
this server was my last resource
i even took help from their inbuilt copilot but not even that could help me
i have another file with all of the typed clases such as User, Dms etc
then the main file which shouldnt interfere with this
but yea I would really appreciate some help so if anyone knows this stuff feel free to answer 😄
.DefaultRequestHeaders.Authorization = new("Bearer", "XXX");
Unknown User•3w ago
Message Not Public
Sign In & Join Server To View
yea but that just returns 401 unauthorized
Unknown User•3w ago
Message Not Public
Sign In & Join Server To View
well im kinda new to http system so i tried doing something
didnt know what to name it
Unknown User•3w ago
Message Not Public
Sign In & Join Server To View
yea
Unknown User•3w ago
Message Not Public
Sign In & Join Server To View
this is just a learning thing
im not gonna use it for purposes as such
Unknown User•3w ago
Message Not Public
Sign In & Join Server To View
oh i see
Unknown User•3w ago
Message Not Public
Sign In & Join Server To View
well that's a different thing, you showed error trying to set auth header twice
Unknown User•3w ago
Message Not Public
Sign In & Join Server To View
yea, but am i not only setting it once?
yea i get you dont worry abt it
Unknown User•3w ago
Message Not Public
Sign In & Join Server To View
i will try figure it out myself, if i can
i understand
do you have any tips for a beginner coder or any other place to ask? - if this doesnt count as helping aswell
Unknown User•3w ago
Message Not Public
Sign In & Join Server To View