External API activity - Error in Content type | Community
Skip to main content
somasundaram_h
Community Advisor
Community Advisor
May 11, 2020
Solved

External API activity - Error in Content type

  • May 11, 2020
  • 2 replies
  • 7096 views

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"

 

 

 

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by bisswang

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.

2 replies

bisswangAdobe EmployeeAccepted solution
Adobe Employee
May 11, 2020

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.

somasundaram_h
Community Advisor
Community Advisor
May 12, 2020

Hi @bisswang 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.

December 15, 2021

Hi  @somasundaram_h ,

 

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

 

Regards,

Shloak

February 15, 2022

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_type=logo&page_type=product&show_cta=true

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.