Hey everyone.
I’m trying to make a Roblox - Twitter Module but Twitter Tokens have % in them, when I send a request with the token in the header, I get this error:
I’ve tried removing the %'s and adding \'s before them (\%) but neither of these worked.
I have also tried UrlEncoding it and JsonEncoding it but these did not work either.
Are there any work arounds to this?
1 Like
Soliform
(Soliform)
August 21, 2021, 3:00am
#2
Hello, there is a post that is identical to this. Please search the devforum for similar topics to the one you plan to create before making it.
I would like to make a call to twitter to fetch the latest tweets.
When I call the service, I want to use the Bearer token for authentication.
However, as the bearer token contains a “%”, the call fails with the error:
Header “Authorization” has unallowed character “%” in value “Bearer …oP4iw%3DoZ…”
I have shortened the token as it is a secret
Here is the code I have:
local headers = {["Authorization"] = "Bearer ..d4llaoP4iw%3DoZBnejRZSXvO..."}
-- Use pcall in case some…
The error was never solved. [char]
There is probably not a way to avoid this, even encoding it as \x25
doesn’t work. You will need to find a way to send the request without the %
in the header or use a proxy server to send the request.
1 Like
Does anyone have a resolution to this yet?
Kurookku
(Kurokku)
October 8, 2021, 9:14pm
#6
Have you ever found a solution or a way around this yet?
Unfortunately no.
If you need to use % or any restricted symbols you’ll need to make a proxy that can put that stuff in headers for you.
Kurookku
(Kurokku)
October 10, 2021, 5:57pm
#8
Dang, I figured that would be the case. Thanks for the response though!
1 Like