Use Messaging Service API on games that you don't own

I’ve been wondering, is it possible to use the MessagingService API in someone else’s game


If you don’t get what I mean, heres a small explanation:

I have someone’s game that you can execute scripts in. (Script Builders)
I inject a ModuleScript which listens to a MessagingService topic.

Then there is a Node.js script that publishes the topic. It works in my game that I own and connected to the Access Permissions thing


But will I be able to do it using the same thing in somebody else's game?
Node scripts:

const axios = require('axios').default
module.exports = {
    sendMessage: async (message, universe, topic) => {
        const API_KEY = "[API_KEY_GOES_HERE]"
        const DATA = {'message': message}
        const URL = `https://apis.roblox.com/messaging-service/v1/universes/${universe}/topics/${topic}`
        const Result = await axios.post(URL, DATA, {headers:{
            "x-api-key": API_KEY,
            'Content-Type': 'application/json'
        }})
        
        console.log(Result.data)
        return Result;
    }
}
const message = require('./message')

async function Example(){
    const result = await message.sendMessage('hi', 5889821539, 'GlobalKick')
    console.log(`Message data: ${result.data}`)
}

Example()

you could use oauth2 for that.

No, you can’t. It’s just not possible to do this with API keys as they require you to own the game or have the OAuth2 permissions in the group that owns the game.

Fyi what you’re doing could be considered malicious…