Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is there any web API for checking if a user has premium?

Asked by 4 years ago

Is there any web API for checking if a user has premium?

I would like to make a website for limiteds but one of the features I want to include would require checking if someone has premium or not. Is there any web api that can do that?

Or if not, how would be the best way to determine if someone has Premium (not BC, TBC, etc) using http requests with cURL from a website.

0
Have you tried HttpService? Ziffixture 6913 — 4y
0
No that's not possible, explain how you can use that from a website? nestriff 27 — 4y
0
Ah, you're looking for something that isn't related to ROBLOX Studio then? Ziffixture 6913 — 4y

2 answers

Log in to vote
1
Answered by
VitroxVox 884 Moderation Voter
4 years ago

Hello, as @EmilyBendsSpace 's method/post would work let me get you an easier method so you can understand how to do it as i see you're just starting out, here let's start with an

localscript method:

local p = game:GetService("Players").LocalPlayer

if p.MembershipType == Enum.MembershipType.Premium then
    print(p.." Has premium")
else
    print(p.. " Doesn't have premium")
end

serverscript method:

game:GetService("Players").PlayerAdded:Connect(function(p)
    if p.MembershipType == Enum.MembershipType.Premium then
    print(p.." Has premium")
else
    print(p.. " Doesn't have premium")
    end
end)

As there's still things like MembershipType.BuildersClub, OBC, TBC they don't work cause as you know they removed that but, Enum.MembershipType.None is one of the working/useful things as well.

If you still don't know check out roblox's source for it

HERE

Ad
Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

https://premiumfeatures.roblox.com/v1/users/<userid>/subscriptions

Caveat: building a website that relies critically on any Roblox web API is a bad idea. Roblox could change or remove this at any time.

Answer this question