WHM version: 70
OS: CLOUDLINUX 6.9
Client API Server OS: Windows 2008 R2 Standard
Client API Language: asp classic/vbscript
I have the asp code below to communicate with whm api but it's not working.
WinHttp.WinHttpRequest error '80072f8f'
A security error occurred
**.asp, line 13 (in bold)
I debuged and I get:
* About to connect() to whmurl port 2087 (#0)
* Trying [ip]...
* connected
* Connected to whmurl ([ip]) port 2087 (#0)
* error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
* Closing connection #0
Any clue? Is it related to TLS or SSL versions?
OS: CLOUDLINUX 6.9
Client API Server OS: Windows 2008 R2 Standard
Client API Language: asp classic/vbscript
I have the asp code below to communicate with whm api but it's not working.
<%
user = "root"
token = "****"
url = "https://whmurl:2087/json-api/createacct"
query = "api.version=1&username=matheus&domain=mathexample.com&plan=teste"a=0&password=*****&ip=n&cgi=1&contactemail=matheus%40domain.com.br&mxcheck=local&owner=root&language=pt_br"
user = "root"
token = "****"
url = "https://whmurl:2087/json-api/createacct"
query = "api.version=1&username=matheus&domain=mathexample.com&plan=teste"a=0&password=*****&ip=n&cgi=1&contactemail=matheus%40domain.com.br&mxcheck=local&owner=root&language=pt_br"
Set http = Server.CreateObject("WinHttp.WinHttpRequest.5.1")
With http
Call .Open("GET", url, False)
Call .SetRequestHeader("Content-Type", "text/plain; charset='utf-8'")
Call .SetRequestHeader("Authorization", "whm "&user&":"&token)
Call .Send(data)
End With
If Left(http.Status, 1) = 2 Then
'Request succeeded with a HTTP 2xx response, do something...
Else
'Output error
Call Response.Write("Server returned: " & http.Status & " " & http.StatusText)
End If
I always get this error:With http
Call .Open("GET", url, False)
Call .SetRequestHeader("Content-Type", "text/plain; charset='utf-8'")
Call .SetRequestHeader("Authorization", "whm "&user&":"&token)
Call .Send(data)
End With
If Left(http.Status, 1) = 2 Then
'Request succeeded with a HTTP 2xx response, do something...
Else
'Output error
Call Response.Write("Server returned: " & http.Status & " " & http.StatusText)
End If
WinHttp.WinHttpRequest error '80072f8f'
A security error occurred
**.asp, line 13 (in bold)
I debuged and I get:
* About to connect() to whmurl port 2087 (#0)
* Trying [ip]...
* connected
* Connected to whmurl ([ip]) port 2087 (#0)
* error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
* Closing connection #0
Any clue? Is it related to TLS or SSL versions?