Hello,
I wanted to ask if anybody using the DirectAdmin API could please help me. I red the API documentation but I can’t get it to work. I always get the login page html as a response.
Here’s an example with CURL:
curl --request POST -i --user 'my_control_panel_user:my_contol_panel_pass' https://taylor.mxrouting.net:2222/CMD_API_SHOW_DOMAIN
Response:
HTTP/1.1 200 OK
Server: DirectAdmin Daemon v1.61.5 Registered to MXroute
X-Frame-Options: sameorigin
Set-Cookie: session=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT; secure; HttpOnly
Connection: close
Cache-Control: no-cache
Pragma: no-cache
X-DirectAdmin: Unauthorized
Content-Type: text/html
X-language-list: en
X-language-default: en
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8;"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>
taylor.mxrouting.net | Login
</title>
...
Thank you.