Using API with MSXML2.ServerXMLHTTP in VBA

Using API with MSXML2.ServerXMLHTTP in VBA

Hi I am trying to use the API to create a request via the API and the MSXML2.ServerXMLHTTP in Excel VBA.

Here is my code:

Sub create_ticket()
    Dim headers As String
    Dim objHTTP As Object
    Dim result As String
    Key = "517AC905-BE76-4EF7-BC46-02C93A7CDCD2"
    input_data = "{""request"":{""subject"":""API Test VBA"",""description"":""I am unable to fetch mails from the mail server"",""category"":{name:""Software""},""requester"":{""id"":""4"", ""name"":""administrator"" }, ""resolution"":{""content"":""Mail Fetching Server problem has been fixed"" }, ""status"":{""name"":""Open"" }}}"

    Set objHTTP = CreateObject("MSXML2.ServerXMLHTTP")
    objHTTP.Open "POST", URL, False
    objHTTP.setRequestHeader "authtoken", Key
    objHTTP.send input_data
    result = objHTTP.responseText

    'FOR debugging
     Range("A1").Value = result
     Range("A2").Value = input_data
    Set objHTTP = Nothing
End Sub


I get this response:

{"response_status":{"status_code":4000,"messages":[{"status_code":4001,"field":"input_data","type":"failed","message":"Value not provided"}],"status":"failed"}}

Can you please help me in making this code work, Thank You
I have attached the excel file.

                  New to ADSelfService Plus?