Hi! Just want to know if there is a way to set an Omnichannel webhook via the api and not in the Omnichannel settings ui? I see there is the Integrations api but I am not sure if this covers Omnichannel webhooks as well. Any help would be much appreciated.
Thanks in advance.
Server Setup Information
- Version of Rocket.Chat Server: 3.2.0
- Operating System: macOS Mojave
- Deployment Method: docker
- Number of Running Instances: 1
- DB Replicaset Oplog: Enabled
- NodeJS Version: 12.16.1
- MongoDB Version: 4.0.6
Hi,
You are a bit behind with your version - you really should be on 3.13.x right now. If there are any issues with your version they won’t get fixed and you will be asked to upgrade.
Can you get a list of webhooks and see if the Omnichannel ones are there?
https://developer.rocket.chat/api/rest-api/methods/integration
Please ask if you have any questions.
Hi Paulo!
As stated, is really important to upgrade and keep up to the latest version.
Almost all Rocket Chat configurations can be changed via the API.
For what you want, use the following endpoint:
https://developer.rocket.chat/api/rest-api/methods/settings/update
a curl command can do the job, considering you have the necessary tokens for auth:
curl -H “X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq”
-H “X-User-Id: aobEdbYhXfu5hkeqG”
-H “Content-type:application/json”
http://localhost:3000/api/v1/settings/Livechat_webhookUrl
-d ‘{ “value”: “http://my_awesome_endpoint”}’
You can get a list of all available settings name space from this other api:
https://developer.rocket.chat/api/rest-api/methods/settings/get
Happy rocking!
1 Like
Hi @john.crisp and @dudanogueira . Thank you so much for the insights. Yes, i think we should upgrade to the latest version and follow as you have suggested. Thanks again and really appreciate the help.
No problems - please come back if you get stuck again.