Hello, I’m making a web panel for my game and we are trying to do Server shutdowns from our panel.
Our Server code:
app.post('/shutdown', async (req, res) => {
try {
await axios.post(
"https://apis.roblox.com/messaging-service/v1/universes/14269316750/topics/shutdown",
{
message: "Server Shutdown Via Panel."
},
{
headers: {
'x-api-key': config.MSAPIKEY,
'Content-Type': 'application/json'
}
}
);
res.status(200).send({ message: 'Shutdown message sent successfully.' });
} catch (error) {
console.error('Error sending shutdown message:', error);
res.status(500).send({ error: 'Failed to send shutdown message.' });
}
});
Our Roblox code:
local HTTPs = game:GetService("HttpService")
local Players = game:GetService("Players")
local MessagingService = game:GetService("MessagingService")
MessagingService:SubscribeAsync("shutdown", function(message)
local reason = message.Data
warn("SHUTTING DOWN")
task.wait(5)
for _, player in ipairs(Players:GetPlayers()) do
player:Kick("\n\n\n[Shutdown Reason]: " .. reason)
end
end)
When I look through the Server logs and Roblox Logs. The Server logs shows a request sent into our POST Endpoint but on the Roblox side I see no logs for an Incoming MessagingService Topic Request.
Server Logs:
![]()