Cannot teleport to a reserved server

According to ROBLOX API, the correct way to teleport someone to a reserved server is through:

TeleportToPrivateServer(placeId: number, reservedServerAccessCode: string, players: array)

However when I tried to do it myself through the code below, I receive a message saying I do not have access to this reserved server. Additionally, the dev console outputs the following error: “access code for reserved server is not valid (unauthorized)”

TeleportEvent.OnServerEvent:Connect(function(player)
    local TeleportService = game:GetService("TeleportService")
    local k = TeleportService:ReserveServer(PlaceId)

    TeleportService:TeleportToPrivateServer(PlaceId, k, {player})
end)

I’m attempting to reserve a server from the start place of a universe/experience for another place within the same universe. This should not be an issue.

Are you testing in studio because in studio you cannot teleport between servers

No, I’m testing it directly through live servers.

Update: The issue somehow resolved itself despite not making any changes to my current script. This leaves me worried about using Teleport Service in the future.