Hello
Is there any possibility to send the name,room,message to external server in PHP link via outgoing webhook script
Example:
1.when user join the room
2. Send data like HTTPS://domain.com/PHP?name=username &room=rcroom&message=message
Thanks in advance.
Server Setup Information
- Version of Rocket.Chat Server:
- Operating System:
- Deployment Method:
- Number of Running Instances:
- DB Replicaset Oplog:
- NodeJS Version:
- MongoDB Version:
- Proxy:
- Firewalls involved:
Any additional Information
Thank you, one more question, app token is optional but I cannot leave it blank and I am testing this simple.code but reading url and app token from the page settings not from the script, script is not running even it is enabled
const GlpiApi = require(‘glpi-api’);
// Config with user_token
const config = {
app_token : ‘AHBIwc4M21Q8yaOzrluxojHJRvHTF6gteAlDBaFW’,
apiurl : ‘https://myglpi.com/apirest.php’,
user_token : ‘tt5jyPvv311OzjmrJMNh2Gqgu5ovOOy7saE2fI5ha’,
};
// or
// Config with basic auth
const config = {
app_token : ‘AHBIwc4M21Q8yaOzrluxojHJRvHTF6gteAlDBaFW’,
apiurl : ‘https://myglpi.com/apirest.php’,
auth : {
username : ‘glpi’,
password : ‘secret’,
},
};
const glpi = new GlpiApi(config);
I am sorry - I did not understand your question.
Script doesn’t run from the webhook, it only work on the url provided in webhook, my understanding is that script will override the webhook page settings, url and token
Webhook is only invoking the url provided in url field and sending the token.
I need to override url and token in the script to pass the data
as per the screen shots, script doesnt run and override the URL and token, it is always using the URL from URL field, I want to replace the URL and token from the script, also token field is optional on the form, however when I make the change and try to save, it complains about that token is invalid.