I'm attempting to send some data via a GET request in SSJS on a CloudPage. The code below is throwing a 500 server error. I'm assuming that means there's something wrong with the syntax but I can't figure out what that would be.
This is what my API documentation says the request should look like, and I guess I'm just having trouble converting it to the format of the SSJS function:
GET /WS/Interaction.asmx/IssueInteractionUserDefined?WSSecurityToken=string&MemberAccountId=string&SBInternalMemberId=string&InteractionTypeExternalReference=string&LocationExternalReference=string&InteractionNote=string HTTP/1.1
Host: app.domain.com
var email = Request.GetQueryStringParameter("e");
var url = 'https://app.domain.com/WS/Interaction.asmx/IssueInteractionUserDefined';
var interaction = 'Dec2021-Survey';
var headers = ['WSSecurityToken','MemberAccountId','SBInternalMemberId','InteractionTypeExternalReference','LocationExternalReference','InteractionNote'];
var values = ['token',email,'-1',interaction,'Sales_Force',''];
var response = HTTP.Get(url, headers, values);
Write(response.Status + '<br />');
Write(response.Content);
Error Message:
"An error occurred when attempting to evaluate a HTTPGet function call. See inner exception for details.\r\n ClientID: 6252256\r\n JobID: 0\r\n ListID: 0\r\n BatchID: 0\r\n SubscriberID: 0\r\n URL: https://app.domain.com/WS/Interaction.asmx/IssueInteractionUserDefined\r\n"
Description:
"ExactTarget.OMM.FunctionExecutionException: An error occurred when attempting to evaluate a HTTPGet function call. See inner exception for details.\r\n ClientID: 6252256\r\n JobID: 0\r\n ListID: 0\r\n BatchID: 0\r\n SubscriberID: 0\r\n URL: https://app.domain.com/WS/Interaction.asmx/IssueInteractionUserDefined\r\n Error Code: OMM_FUNC_EXEC_ERROR\r\n - from OMMCommon --> \r\n\r\n --- inner exception 1---\r\n\r\nExactTarget.OMM.OMMException: An exception occurred when attempting to retrieve content by a HttpGet call. URL: https://app.domain.com/WS/Interaction.asmx/IssueInteractionUserDefined\r\n Error Code: HTTP_WB_RTV\r\n - from OMMCommon --> \r\n\r\n --- inner exception 2---\r\n\r\nSystem.Net.WebException: The remote server returned an error: (500) Internal Server Error. - from System\r\n\r\n\r\n\r\n\r\n\r\n"