Hello!
I am very new to Plesk and I'm doing this for a friend who is also stumped. He's got a Plesk server set up and wants to access the Rest API remotely, but whenever he or I try on our own machines, we get the following error:
[root@vps ~]# curl -i -k -X GET -u admin:thepasswordgoeshere -H "Content-Type: application/json" -H "Accept: application/json" "https://domain:8443/api/v2/domains"
I am very new to Plesk and I'm doing this for a friend who is also stumped. He's got a Plesk server set up and wants to access the Rest API remotely, but whenever he or I try on our own machines, we get the following error:
[root@vps ~]# curl -i -k -X GET -u admin:thepasswordgoeshere -H "Content-Type: application/json" -H "Accept: application/json" "https://domain:8443/api/v2/domains"
HTTP/1.1 401 Unauthorized
Server: sw-cp-server
Date: Sat, 09 Nov 2019 19:13:43 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: *
Access-Control-Allow-Headers: *
WWW-Authenticate: Basic realm="Plesk RESTful API"
I tried to check if he had any IP's banned and that that might be any issue, but I didn't see any. So, how do I remotely connect to a Plesk Onyx for Linux Rest API?Server: sw-cp-server
Date: Sat, 09 Nov 2019 19:13:43 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: *
Access-Control-Allow-Headers: *
WWW-Authenticate: Basic realm="Plesk RESTful API"