Test LDAP Connection

Prev Next
Post
/api/v1/ldap.testConnection
Premium tag

Test if Rocket.Chat can connect to the specified LDAP server using the port and host provided in the Rocket.Chat settings. Make sure LDAP is enabled in Manage → Workspace → Settings → LDAP → Enable before using this endpoint.

Permission required: test-admin-options

From Rocket.Chat 9.0.0, LDAP is available on Starter workspaces and on all premium plans (Commercial, Government, and Defense). It is not available on Community workspaces, where this endpoint returns error-action-not-allowed. See Our Plans for details.

Changelog

Version Description
9.0.0 Added premium plan availability details.
Header parameters
X-Auth-Token
stringRequired

The authenticated user token.

ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
X-User-Id
stringRequired

The authenticated user ID.

ExamplerbAXPnMktTFbNpwtJ
Responses
200

OK

Success Example
{
  "message": "Connection_success",
  "success": true
}
object
message
string
success
boolean
400

Bad Request

Not available on Community workspaces
{
  "success": false,
  "error": "This is an enterprise feature [error-action-not-allowed]",
  "errorType": "error-action-not-allowed"
}
object
success
boolean
error
string
errorType
string
401

Unauthorized

Authorization Error
{
  "success": false,
  "error": "You must be logged in to do this."
}
object
success
boolean
error
string