HTTPS API call FROM Campaign To an external API.

Avatar

Avatar
Validate 1
Level 2
anumola8359486
Level 2

Likes

8 likes

Total Posts

18 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
anumola8359486
Level 2

Likes

8 likes

Total Posts

18 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile
anumola8359486
Level 2

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)

Avatar

Avatar
Validate 1
MVP
Jean-Serge_Biro
MVP

Likes

353 likes

Total Posts

464 posts

Correct reply

153 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Validate 1
MVP
Jean-Serge_Biro
MVP

Likes

353 likes

Total Posts

464 posts

Correct reply

153 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile
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)

Avatar

Avatar
Give Back 5
Level 3
parveshp7822672
Level 3

Likes

14 likes

Total Posts

37 posts

Correct reply

5 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 3
Ignite 1
View profile

Avatar
Give Back 5
Level 3
parveshp7822672
Level 3

Likes

14 likes

Total Posts

37 posts

Correct reply

5 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 3
Ignite 1
View profile
parveshp7822672
Level 3

12-09-2019

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. 

Avatar

Avatar
Validate 1
Level 1
aforabhishek
Level 1

Likes

2 likes

Total Posts

4 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
aforabhishek
Level 1

Likes

2 likes

Total Posts

4 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
aforabhishek
Level 1

10-12-2018

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

Avatar

Avatar
Give Back 50
Level 10
florentlb
Level 10

Likes

237 likes

Total Posts

1,109 posts

Correct reply

239 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 200
View profile

Avatar
Give Back 50
Level 10
florentlb
Level 10

Likes

237 likes

Total Posts

1,109 posts

Correct reply

239 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 200
View profile
florentlb
Level 10

25-08-2017

Hi,

Were you able to get the information requested by Jean-Serge?

Let us know,

Florent

Avatar

Avatar
Validate 1
Level 2
anumola8359486
Level 2

Likes

8 likes

Total Posts

18 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
anumola8359486
Level 2

Likes

8 likes

Total Posts

18 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile
anumola8359486
Level 2

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 .

Avatar

Avatar
Validate 1
MVP
Jean-Serge_Biro
MVP

Likes

353 likes

Total Posts

464 posts

Correct reply

153 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Validate 1
MVP
Jean-Serge_Biro
MVP

Likes

353 likes

Total Posts

464 posts

Correct reply

153 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile
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

Avatar

Avatar
Validate 1
Level 2
anumola8359486
Level 2

Likes

8 likes

Total Posts

18 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
anumola8359486
Level 2

Likes

8 likes

Total Posts

18 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile
anumola8359486
Level 2

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

Avatar

Avatar
Validate 1
MVP
Jean-Serge_Biro
MVP

Likes

353 likes

Total Posts

464 posts

Correct reply

153 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Validate 1
MVP
Jean-Serge_Biro
MVP

Likes

353 likes

Total Posts

464 posts

Correct reply

153 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile
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