# Webhook outgoing send data on PHP url

**URL:** <https://forums.rocket.chat/t/webhook-outgoing-send-data-on-php-url/14825>\
**Category:** Community Support\
**Created:** [September 3, 2022, 2:39am UTC](https://forums.rocket.chat/t/webhook-outgoing-send-data-on-php-url/14825 "2022-09-03T02:39:21Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![androidbaji](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@androidbaji](https://forums.rocket.chat/u/androidbaji)\
**Post date:** [September 3, 2022, 2:39am UTC](https://forums.rocket.chat/t/webhook-outgoing-send-data-on-php-url/14825/1 "2022-09-03T02:39:21Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![debdut.chakraborty](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/debdut.chakraborty/32/2900_2.png) [@debdut.chakraborty](https://forums.rocket.chat/u/debdut.chakraborty)\
**Post date:** [September 3, 2022, 3:23pm UTC](https://forums.rocket.chat/t/webhook-outgoing-send-data-on-php-url/14825/2 "2022-09-03T15:23:48Z")

</div>

Not as query params but as body parameters, yes. [https://docs.rocket.chat/guides/administration/admin-panel/integrations#outgoing-webhook-script](https://docs.rocket.chat/guides/administration/admin-panel/integrations#outgoing-webhook-script)

---

<div class="post-metadata">

**Author:** ![androidbaji](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@androidbaji](https://forums.rocket.chat/u/androidbaji)\
**Post date:** [September 3, 2022, 3:41pm UTC](https://forums.rocket.chat/t/webhook-outgoing-send-data-on-php-url/14825/3 "2022-09-03T15:41:45Z")

</div>

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](https://myglpi.com/apirest.php)’,  
user\_token : ‘tt5jyPvv311OzjmrJMNh2Gqgu5ovOOy7saE2fI5ha’,  
};

// or

// Config with basic auth  
const config = {  
app\_token : ‘AHBIwc4M21Q8yaOzrluxojHJRvHTF6gteAlDBaFW’,  
apiurl : ‘[https://myglpi.com/apirest.php](https://myglpi.com/apirest.php)’,  
auth : {  
username : ‘glpi’,  
password : ‘secret’,  
},  
};

const glpi = new GlpiApi(config);

---

<div class="post-metadata">

**Author:** ![debdut.chakraborty](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/debdut.chakraborty/32/2900_2.png) [@debdut.chakraborty](https://forums.rocket.chat/u/debdut.chakraborty)\
**Post date:** [September 3, 2022, 3:54pm UTC](https://forums.rocket.chat/t/webhook-outgoing-send-data-on-php-url/14825/4 "2022-09-03T15:54:47Z")

</div>

I am sorry - I did not understand your question.

---

<div class="post-metadata">

**Author:** ![androidbaji](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@androidbaji](https://forums.rocket.chat/u/androidbaji)\
**Post date:** [September 3, 2022, 4:17pm UTC](https://forums.rocket.chat/t/webhook-outgoing-send-data-on-php-url/14825/5 "2022-09-03T16:17:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![androidbaji](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@androidbaji](https://forums.rocket.chat/u/androidbaji)\
**Post date:** [September 3, 2022, 5:19pm UTC](https://forums.rocket.chat/t/webhook-outgoing-send-data-on-php-url/14825/7 "2022-09-03T17:19:44Z")

</div>

![image](https://us1.discourse-cdn.com/flex021/uploads/rocketchat/original/2X/2/2af4fce58086891c94f025e7f71aa681f09eb746.png)

---

<div class="post-metadata">

**Author:** ![androidbaji](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@androidbaji](https://forums.rocket.chat/u/androidbaji)\
**Post date:** [September 3, 2022, 5:20pm UTC](https://forums.rocket.chat/t/webhook-outgoing-send-data-on-php-url/14825/8 "2022-09-03T17:20:27Z")

</div>

screen shot

 ![image](https://us1.discourse-cdn.com/flex021/uploads/rocketchat/original/2X/2/2af4fce58086891c94f025e7f71aa681f09eb746.png)

---

<div class="post-metadata">

**Author:** ![androidbaji](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@androidbaji](https://forums.rocket.chat/u/androidbaji)\
**Post date:** [September 3, 2022, 5:20pm UTC](https://forums.rocket.chat/t/webhook-outgoing-send-data-on-php-url/14825/9 "2022-09-03T17:20:57Z")

</div>

screen shot

 ![image](https://us1.discourse-cdn.com/flex021/uploads/rocketchat/original/2X/c/cdbb9cdd3782bfaf1f3a307348cf4bf96c974e7f.png)

---

<div class="post-metadata">

**Author:** ![androidbaji](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@androidbaji](https://forums.rocket.chat/u/androidbaji)\
**Post date:** [September 3, 2022, 5:22pm UTC](https://forums.rocket.chat/t/webhook-outgoing-send-data-on-php-url/14825/10 "2022-09-03T17:22:42Z")

</div>

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.
