Hello so I scan the gamepasses in my game to see what gamepasses a player owns when they join. This is the code that used to work (I have not updated my game at all so I didnt cause this error)
for i,v in pairs(GamepassIDs) do
if MarketplaceService:UserOwnsGamePassAsync(plr.UserId,v) then
local info = MarketplaceService:GetProductInfo(v, Enum.InfoType.GamePass)
local bv = Instance.new("BoolValue")
bv.Name = info["Name"]
bv.Parent = plr.Gamepasses
end
end
(gamepassIds is just a table with all of the games gamepass IDs)
when running this I get the error that getproductinfo failed because HTTP 401 (unauthorized). It used to work and I touched nothing but now all of a sudden it doesnt work?
This just means you are not authorized for the request. Its Likely you are trying to access something else
Both @hasoco and @ValiantWind are incorrect here, you can just GetProductInfo without the need to disabling a form of security, I made sure to test and yes, I am able to use it without HTTP requests OR API Access.
Ok turns out it is one ID thats causing the error.
“104883102” this ID specifically but I still dont know whats causing this. This gamepass is just like every other one and its under the same game.
same thing is happening in my game aswell only thing i did recently was create a group game in my group now this is happening but my actual game is made by me not the group think roblox is confused and blocking something