SubLock - Check if a user is subscribed to a channel

SubLock

This is an open source module using youtubes api to check if a channel is subscribed to another.

First, you need an api key.

How do I get an api key?

Go to here and create an project. Name it whatever you want.
so many bobux

Now go to here and press create credentials and api key.
This will create an api key.

Now, go to https://console.developers.google.com/apis/library/youtube.googleapis.com/?project= and enable it for your project.

Get the module here. SubLock v1 - Roblox

Documentation

Example Code:


local api_key = "imhidingthisidontwantthisleakedlol"
local sublock = require(game.ReplicatedStorage.SubLock)
local arg1 = "eli"
local arg2 = "UCQPMIikK0U_oMS4PgECMoKg"

sublock:New(api_key)

local subbed = sublock:IsSubscribed(arg1,arg2)
print(subbed)

Functions:

SubLock:New(API_KEY)

Creates a new Sublock class. Calling more than once will override the current api key.

SubLock:IsSubscribed(channel_name,channel_id) New class must be created to use this function

Channel Name is the channel name (in this case, eli.)
Channel Id is the channel id of the channel you are checking

To check if they are subscribed their subscriptions must be public.

14 Likes

What’s the use case for this in Roblox, exactly?

3 Likes

Something like in strucid where you would enter your channel id and check if you were subscribed. If you were subscribed you’d get a reward.

3 Likes

Yeah just some test ui for it, you’ll have to code the server yourself :wink:

1 Like

Hey, this is awesome! I would use this for sure if I had a channel. I would read this topic, try to embed your pictures instead of using Gyazo. That would make it much easier to read! :grinning:

Edit: try to use hyperlinks instead of just pasting the links, it’s much cleaner.

2 Likes

Yeah someone else told me to stop using gyazo lol, I made this post before they made that comment on my portfolio. I’ll switch it to screenshots on my computer

2 Likes

Could you please confirm that something like this is safe by the rules? It would really hurt to use your resource and get banned for a violation of the community rules. I’m expressly speaking about bullet 7 under Section 1 of the Roblox Community Guidelines.

Do not create promotions offering prizes of any sort (including contests, raffles, lotteries, chain letters or any kind of giveaway). It is okay to offer players promo codes for in-game items only so long as they are not in exchange for something (e.g., in exchange for a thumb up on your game).

Roblox Community Rules. Accessed 25 August 2020.

Resources like this could lead to moderation potentially flagging games under the idea that you’re offering in-game rewards in exchange for subscribing to a YouTube channel; or may encourage this kind of behaviour from other developers if they see they have a way to check subscriptions.

1 Like

Hello, this module is more intended for checking if it’s subscribed doesn’t really have a specific
purpose. My title might’ve made it seem like it was for that reason but it can be used in any way, if it is still against the rules I can delete the post.

1 Like

Note that, this method won’t work when the subscriptions are private, strucid has this issue as well.

And @SpiralGaia strucid isn’t above the rules

1 Like

Yeah stated that in the post, but if the api could get private subscriptions it could cause privacy issues.