Hi All,
We have a requirement to call an HTTPs API from AC. Can anyone suggest how we can do the same? do we need to pass the SSL details in the call here ?
Thanks and Regards,
Anumol Antony
Solved! Go to Solution.
Hi Anumol,
And also, please may you give the result of this simple JS activity code in your workflow:
try
{
var url = "https://yourUrlAddress.com"
getUrl(url)
}
catch(e)
{
logInfo("Can't get page content: " + url )
logInfo("Error number: " + e )
}
It is equivalent to a wget/curl command or the same of the standard Web download activity , it download the content of the URL resource. Of course if your endpoint needs credentials to login, it won't work. But I would be sure that this is a true handshake/SSL (TLS) issue you are facing with.
Regards
Jean-Serge
Views
Replies
Total Likes
Hello Anumola,
Is it Adobe Campaign Standard (ACS) or Adobe Campaign v6/v7 ? In that latter case, please indicate your build version.
From Adobe Campaign v6 most recent build 8853 (and AC v7 as well), the URL must be declared in the serverConf.xml file in order to be allowed from workflow Javascript activity and in AC external accounts.
(https://docs.campaign.adobe.com/doc/AC/en/RN.html).
And of course, also in your firewall rules if you are On Premise hosting...
If you have AC with build older than 8853, you can call directly the URL with https call inside Javascript activities boxes.
Please see the JS API documentation for the methods to call (HttpClientRequest, HttpClientResponse; or HttpSoapconnection if the Web Service called is SOAP method not REST method; etc).
You can call directly the target https url in your JS code.
If you need only to download data from an external URL inside a workflow, I recommend you to use the easiest way, define an AC external account (Administration/Platform/External Accounts, create new one, choose http type an then type your https web service url and select SSL security and if needed the credentials and port if not 443).
Then in your workflow JS activity, you can use the Web Download activty, it is very easy to configure and use (even if this activity type you can define directly the URL, it is better to use external account).
Regards
Jean-Serge
Views
Replies
Total Likes
Hi Jean-Serge,
Thank you for the reply. We are calling the HTTPS url ( API End Point) in the JS Script. But we are getting the error
Thanks and Regards,
Anumol Antony
Views
Replies
Total Likes
Hi Anumol,
Please may you give more details?
As the connection is correctly established, it seems to be SSL (TLS) certificate issue but I am not sure, even though handshake issue usually means a problem with the certificate itself.
Regards
J-Serge
Views
Replies
Total Likes
Hi Anumol,
And also, please may you give the result of this simple JS activity code in your workflow:
try
{
var url = "https://yourUrlAddress.com"
getUrl(url)
}
catch(e)
{
logInfo("Can't get page content: " + url )
logInfo("Error number: " + e )
}
It is equivalent to a wget/curl command or the same of the standard Web download activity , it download the content of the URL resource. Of course if your endpoint needs credentials to login, it won't work. But I would be sure that this is a true handshake/SSL (TLS) issue you are facing with.
Regards
Jean-Serge
Views
Replies
Total Likes
Hi Jean-Serge_Biro, getUrl() worked like a charm, but it does not return the CDATA from the content. Do we have any other function that can be used to return the whole content. I am doing it in ACS.
Also, not sure how can i structure this data as in JSON or array, so that i can iterate through data and use the values.
Views
Replies
Total Likes
Hi Jean-Serge,
Sorry for the late reply. This is for our NZ team and I have asked them to give me the API details.
Do you have any documentation on how we can install the SSL certificate , we are using Web App Server Apache now what we want to know is the correct steps to install in Web App server and connect that to the Marketing Instance .
Views
Replies
Total Likes
Hi,
Were you able to get the information requested by Jean-Serge?
Let us know,
Florent
Views
Replies
Total Likes
Thanks Jean-Serge Biron. Your reply helped my use-case.
I have a follow up question which I have asked here - .API Calls from Adobe Campaign.
Would you mind taking a look?
Abi
Views
Replies
Total Likes
Hello Jean,
Could you please check my question Javascript code of https request for client certificate authentication.?
I am looing for https request JS code with client certificate authenticatoin.
Thanks.
Parvesh.
Views
Replies
Total Likes
Views
Likes
Replies