400 error for integrations.create


Can’t create integrations.
From the Admin page I’ve tried creating a simple integration using the sample code created. Every time I try I get a 400 error. The result is: {“status”:“error”,“message”:“API endpoint does not exist”}

I see integrations.create in app.js.

Server Setup Information

  • Version of Rocket.Chat Server: 4.6.2
  • Operating System: Debian11
  • Deployment Method: apt
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
  • NodeJS Version: 14.19.1
  • MongoDB Version: 5.0.7
  • Proxy: apache
  • Firewalls involved: yep

Any additional Information

Pretty much a plain vanilla install. Using local self-signed certs.


Welcome to our forums!

I have tested and it’s working. The example call at our docs was missing the required channel attribute, that I have fixed already:

Please, share the piece of code, or command you are using.

You are probably not pointing to the right endpoint: /api/v1/integrations.create

It doesn’t matter what I put in the script field, as soon as I hit “Save” in the UI I immediately get the “Error: Bad Request” notification.

The url I’m seeing in my browser console is correct: https://chat.scsjc.com/api/v1/integrations.create

Also there is an unhandled promise rejection: Error: Bad Request using the url /client/views/admin/integrations/new/NewIncomingWebhook.js:1493:643053

Ah, I see.

Indeed. I have seen a bug with the error messages not showing properly. It can be this too.

Please, take a look at the developer tools, under network tab. You can probably see the request to save the endpoint failing. There should have, as the response, the reason for the failed save.

My bet is that is doesn’t have a token, as you created it using the API.

Aha! Thanks, dudanogueira!
That’s a very helpful tool, actually. I honestly didn’t notice it was available.
Problem solved.