
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2019 06:49 AM
I have a basic auth defined REST Message. When I test the service through the REST Message interface, it works fine. When I invoke from script though, I get the following error as if it is trying mutual authentication:
"Unable to load certificate : WebVan Mutual Auth Keystore"
The Rest message has Basic auth set with a Basic profile. At the method level it
inherits authentication from the parent. I basically copied the Preview Script Usage
generated code. I've also tried setting authentication information directly in script with
the same results.
var requestContent = {
email: "email@email.com",
};
//setup REST Message
var r = new sn_ws.RESTMessageV2('message_name', 'method_name');
r.setRequestBody(JSON.stringify(requestContent));
gs.log(r.getRequestBody());
//Execute the request
var response = r.execute();
var responseBody = response.getBody();
var httpStatus = response.getStatusCode();
gs.log(httpStatus);
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2019 09:01 AM
The error being logged must be from some other sub process in SN. The issue ended up being with the JSON being set as the message content. Once I corrected the JSON, it began working. Found the typo when I was advised to use the set string parameter method instead of set request body.
This is a big DOH! on my behalf.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2019 09:01 AM
The error being logged must be from some other sub process in SN. The issue ended up being with the JSON being set as the message content. Once I corrected the JSON, it began working. Found the typo when I was advised to use the set string parameter method instead of set request body.
This is a big DOH! on my behalf.