HTTPS API call FROM Campaign To an external API.

anumola8359486

14-08-2017

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

Accepted Solutions (1)

Accepted Solutions (1)

Jean-Serge_Biro

MVP

16-08-2017

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

Answers (7)

Answers (7)

anumola8359486

17-08-2017

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 .

Jean-Serge_Biro

MVP

16-08-2017

Hi Anumol,

Please may you give more details?

  • AC version/build?
  • On Premise/Cloud hosting?
  • SSL certificate fine? Is it a true certificate or self-signed one?
  • Javascript code used?

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

anumola8359486

16-08-2017

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

1280048_pastedImage_0.png

Thanks and Regards,

Anumol Antony

Jean-Serge_Biro

MVP

16-08-2017

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