Stuck with connecting to external API - Invalid content type

Hi,

I’ve been reading all I can find on the forum about this topic but can’t find antyhing with the same issue as myself. There are similar ones but they haven’t made me able to figure out my issue.

I’m trying to connect to an external API and after adding all my parameters I get the error message
Unsupported content type: text/xml
image

After reading on this forum I then tried adding the parameter contentType:text/xml and then also tried contentType: application/xml. None of them worked but now I instead get the below error:

Code 400 with the error message Parameter contentType is not supported.
image

These are the parameters I use:

Any ideas would be greatly appreciated!

Hi, try finding the result key it maybe the problem,
result key can be a word like “data”, read your api’s documentation

Hi @Bobzifer,

I guess this is the API that you are trying to connect?

https://m-transparency.entsoe.eu/content/static_content/Static%20content/web%20api/Guide.html#_authentication_and_authorisation

You need to get details right? In the docs that header is needed for the Post request.

And you need to add this in a Header and it should be Content-Type ( not contentType that you have added currently ) and application/xml according to the docs ( normally it’s Content-Type and application/json for most APIs. I think you could do that with this too? Not sure ).

Try again and let us know!

Thank you

Thanks!

I did try to add Content-Type: application/xml as Header instead of previously used Query Param.
Still doesn’t work but at least now I don’t get the error in the response but I still get the Content type error message.
image

It does however look like I get the data I’m looking for in the response (the price amount) so maybe it’s a matter of finding the result key as Benalihoussam suggested?
image

I just haven’t been able to find it in the documentation.

Not sure this is the problem but I found this in the Adalo documentation and maybe the API I’m trying to use simply cannot return JSON responses.

Cant find any information about this in the API documentation.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.