How to use the Twitter API inside studio?

Hello! As you might’ve noticed Pet Sim X and other games have started implementing a Twitter Follow Verification for in-game boosts. I know a bit about the Twitter API but I still don’t get how to make such a thing.

• I know where to find the API Documentation
• I used the open source Twitter API roblox module (HTTP 403 error)
• I already have a dev account on Twitter

I’ve been trying this for so long but just can’t get how HTTPService works. I’ve asked this question many times but with no response.

If anyone is willing to help it would really mean a lot♥️


About the Http 403 error, try 2 things:

  1. Making your game Public if it is Private.
  2. Enabling ‘Allow Http Requests’ in Game Settings > Security

If you were referring to the twitter API reference, you will first have to sign up to access to it here:

Thank you for not reading my thing whatsoever and just replying mindlessly lol. As I stated before, I already have a Twitter Dev Account. My game is already public and has Http Requests enabled.

What I need is an actual piece of information that will get me in the right direction, because as of now. I don’t really know where to even start coding this.

do you know how basic web requests work? (post, get, patch, ect.)

No, I have no clue how to do so

okay thats fine, i’ll go over what they do and how you can use them in roblox

POST is to upload data to a website
GET is to get data from a website

these are the most common two

If you want to make a follow checker, this endpoint might be right for you: GET followers/list | Docs | Twitter Developer Platform

If you don’t know anything about web requests, you might wanna do some research about
that. The thing you want to do isn’t exactly simple

I know this is a little too much to ask for but would you mind giving me a snippet of code to start with? at least something that allows me to “connect” to the twitter API using my consumer and secret consumer key? I understand that those keys are what allows me to connect to their API

I’m sorry but no, since I don’t know how to myself.
I’ve never used the Twitter API, nor do I have a dev account to test with.

Twitter have their own tutorials, this tutorial goes about how to set-up a project: Step-by-step guide to making your first request to the Twitter API v2 | Docs | Twitter Developer Platform

Oh, okay, thank you either way! I did read those tutorials but I’m still too dumb to do them in roblox lol

You’re not too dumb, you just need some practise and to learn a bit.

Here’s the GetAsync function of HttpsService, this is what you’ll need to do in order to get the twitter followers.

Okay, I’ll try to see what I can do. Do you have discord? I’d love to share my progress and maybe we could learn how to make this together lol. That is of course, if you want to. (itsbasicallydenis#1503)

Happily! I’ll add you, I’m frazer#0001.

Hey, if you guys manage to figure out how to do this, could you post the code? I’ve also been trying to do this so it would help a lot.

As far as we’re aware you can’t do it without a proxy.

Here’s another post that OP created on Stackoverflow regarding this problem: lua - 401 Unauthorized when accessing Twitter API [ROBLOX STUDIO] - Stack Overflow

As he said, the header containing the Twitter Bearer Key contains a “%” which returns an error thus I was unable to further work this out lol. Full code is on the StackOverFlow link that he sent. If you manage to work something out let us know too lol.

If you want to use the original code you will need to use a proxy.

I’ve just found this post: Fixing HttpService: Make PUT, PATCH, DELETE requests, access response headers, proxy to any site, and more

Try using this

Yeah I just saw that too, little gift from the universe ig. I’ll try using it and see what I’ll come up with. I’ll update here in case I figure something out.

1 Like

hey! Can I add you again? my new account is basicallyrbx#0800, your tag doesn’t seem to work anymore so this is why I’m asking, I need your help with something again lol

sent you a request

1 Like

Did you ever manage to figure this out??