Expand my Community achievements bar.

We are excited to introduce our latest innovation to enhance the Adobe Campaign user experience — the Adobe Campaign v8 Web User Interface!
SOLVED

External API activity - Error in Content type

Avatar

Level 5

Hi all,

 

This is the first time I'm using External API activity in ACS. I tried to execute the workflow. I'm getting the following error. Please advise what went wrong.

- Inbound mapping and outbound mapping are done

- No issues in column definition

- Tried to set the request headers as "Accept: application/json"  and "Content-Type: application/json"

 

external-api-error.png

 

 

 

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

The issue is on server side.

The called URL is returning content-type HTML which is not supported by the External API activity.

So either the wrong URL was used or the server delivers a wrong content type.

View solution in original post

6 Replies

Avatar

Correct answer by
Employee Advisor

The issue is on server side.

The called URL is returning content-type HTML which is not supported by the External API activity.

So either the wrong URL was used or the server delivers a wrong content type.

Hi @ramon_bisswanger Yes, the url is not returning the Content-Type as 'application/json'. I tried to figure it out by myself and see that url was returning empty Content-Type. I had to modify server side changes to return Content Type as application/json and then it worked fine. Thanks for your help.

Avatar

Level 1

Hi  @somasundaramhal ,

 

Can you guide me what process you did. I am also facing same issue.

 

Regards,

Shloak

Avatar

Level 5

This needs to be fixed in the Web Service level. That means, the URL that you're calling in an API activity right, that server's response should be updated as above(content type as application/json).

Avatar

Level 1

Hi  @somasundaramhal ,

 

Can you provide more detail at which section and what changes needed to be done ?
Like in Server config or Instance config or any other Adobe Campaign Standard configuration or changes needed in api side ?

Regards,

Vishant

Avatar

Level 2

are u calling any private api, which required any token or API-Key, that you need to send in your header. or you need to whitelist your IP Address(env from where you are hitting) on server. then only you will get response.

 

i am using External API, its working for me. it you want to test it, do the following.

In execution: https://www.affirm.com/api/promos/v2/GIX13AE33EUODJHQ?amount=8999&field=ala&logo_color=blue&logo_typ...

In outbound Mapping , Sample response: 

{
"promo": {
"html_ala": "Starting at <span class='affirm-ala-price'>$16</span>/mo with <span class='__affirm-logo __affirm-logo-blue'>Affirm</span>. <a class='affirm-modal-trigger'>Learn more</a>",
"config": {
"promo_prequal_enabled": true,
"promo_style": "prequal"
},
"ala": "Starting at $16/mo with Affirm. Learn more"
}
}

 

checked the parse button , then run. it will work.