I am trying to use the Twitter API inside Roblox and I am not sure how to go about this.
Just doing this HTTPService:GetAsync("https://api.twitter.com/2/users/by/username/oskxzr/following") will not work, because I have not supplied my credentials.
I have my API Key, Key Secret, and Bearer Token, but how do I supply these to GetAsync?
The StackOverFlow link has code to get you started. The only problem is Roblox doesn’t allow % which made me do all that stuff, for HTTP 401 Unauthorized.
RequestAsync is essentially the same as GetAsync just with more features, it allows you to provide a dictionary which will include the URL you are requesting, method (GET, POST, DELETE, etc.), headers, and the body.
HTTPService:RequestAsync is what is used to send Headers with the request, that’s where the Credentials will go. There must be something about Headers in the Twitter Api