Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

GetPlayerPlaceInstanceAsync returns HTTP 403?

Every time I use this method with a valid userId it always returns the following:

false, "HTTP 403 (Forbidden)", (some random PlaceId)

Does anyone know the reason why this is happening to me? Is it me or is it something else because I feel like its Roblox. I even tried the method in a script all by itself with a valid userId and it returned the same thing.

Here's the snippet where the method is used (this is inside a LocalScript)

local function attemptJoin()
	local success,errormsg,placeId,instanceId = transport:GetPlayerPlaceInstanceAsync(tonumber(userid))
	if not success or placeId == placeIds.hub then
		global.signal.warning:fire("Player not in Building Universe"..(success and "" or ": "..errormsg)) 
		join.Text = "Join"
		canRespond = true 
		return
	end
	if placeId ~= (stype and placeIds[stype] or placeIds.public) then
		global.signal.warning:fire("The player was not detected in the requested server type.") 
		join.Text = "Join"
		canRespond = true 
		return
	end
	join.Text = "Working..."
	transport:TeleportToPlaceInstance(stype and placeIds[stype] or placeIds.public,instanceId)
end

2 comments

0

I'm not sure what it is. But it probably only works when running in a server, and it probably has to run from a server script when running in a server, not in Edit or Solo mode. I am getting the same problem. I don't think the method works yet.

0

^, This method does in fact work; Theres a demo that UristMcSparks own's I would try to find it and check it out!

1 answer

-Go to the page of your game

-Go to Configure this Game

-Check "Enable Studio Access to API Services"

Some services don't function unless the place has been uploaded and given the proper permissions (there are other permissions in Configure Place, too). This means you cannot open a new place and have these functions work, you have to edit a place that's been given permission.

This discussion is preserved as it was. New answers, comments, and votes are closed.