Http 400 Bad request Error

Hi there, I’m trying to check if a aplayer is following someone on twitter, as I’ve seen this in another game.

Here’s the code I’m using so far:

game.ReplicatedStorage.GetFollowerList.OnServerEvent:Connect(function(Handle)
	local Results = Http:GetAsync('https://api.twitter.com/1.1/followers/list.json?user_id=1255370872770236418&cursor=-1&screen_name=ChainLemonade&skip_status=true&include_user_entities=false')
	Results = Http:JSONDecode(Results)
	print(Results)
end)

(From GET followers/list | Docs | Twitter Developer Platform)

However, I just get a Bad Request 400 error.

Anyone know why, and how I can fix this? HTTP is in enabled, and I’m in studio.

1 Like

Attempting to go to the URL, it shows this:

{"errors":[{"code":215,"message":"Bad Authentication data."}]}

I’m not familiar with the Twitter API, but I’m guessing you need a login cookie/header.

Edit: Looking at the documentation for the Twitter API, there’s a message at the top of the page saying you need a developer account to use the API, so I’m pretty sure you just need to give the login token/cookie in the HTTP request.

You likely need some sort of private API key.

you still need help? dm basicallyrbx#0800 and I’ll walk you through it

1 Like

Can you post here the solution to fixing this error?