local MessagingService = game:GetService("MessagingService")
MessagingService:SubscribeAsync("test", function(msg)
print(msg.Data)
end)
It is my studio script
`
const axios = require('axios');
const Object = {
'RobloxID':1234, "Money":10000
}
const RobloxAPI = async () => {
axios.post("https://apis.roblox.com/messaging-service/v1/universes/4317834354/topics/test", {'message': JSON.stringify(Object)}, {
headers: {
"x-api-key": "mykey",
"Content-Type": "application/json"
}
}).then(response => {
console.log(response.data)
}).catch(error => {
console.log(error.response.data)
})
}
RobloxAPI()
It is my node.js web server code
In Roblox Studio, Game Settings/Security/“Enable use of Studio’s API service” is turned on, ip setting is set to 0.0.0.0/0 in the API key settings, and the universe ID and access permission settings are set perfectly, and I have reviewed them several times.
When I run the game and run my code with node . in vscode, I get an empty response in my webserver console, but no response in Roblox studio.
There is no error output from the whole process, so I’m not sure how to fix this.
Can you please help me with my problem?