Skip to main content
Solved

Issue Sending Files to API via FME

  • August 18, 2025
  • 4 replies
  • 71 views

francisco_1988
Contributor
Forum|alt.badge.img+5

I need to send three files to an API. When I do it directly via the API, I have no issues—the files are sent and I receive status code 200. However, when I try to send them through FME, I can’t get it to work. Am I making some configuration mistake in FME?

Best answer by alexbiz

The header part of the request is documented here : 

 

You don’t need to set the “content-type” one, it will be automatically defined with what you choose here : 

 

But the “Accept” one might need to be defined, like this : 

 


Another thing, the documentation asks for parts that should be called “files” : 


But it seems like you called yours “Local File” :

 

That’s why you have the error that we could interpret as “missing the ‘body’ or ‘files’ key”

You should change that too

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

alexbiz
Influencer
Forum|alt.badge.img+28
  • Influencer
  • August 18, 2025

Hey Francisco,

Things to check : 

- response body of your rejected feature

- authentication ?

- you've missed the "accept" header


francisco_1988
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • August 18, 2025

Hey Fransisco,

Things to check : 

- response body of your rejected feature

- authentication ?

- you've missed the "accept" header

Response body of your rejected feature


{"detail":[{"type":"missing","loc":["body","files"],"msg":"Field required","input":null}]}

 

The API currently does not require authentication.

 

Could you help me with the "accept" header? I didn’t quite understand how to configure this header.


alexbiz
Influencer
Forum|alt.badge.img+28
  • Influencer
  • Best Answer
  • August 18, 2025

The header part of the request is documented here : 

 

You don’t need to set the “content-type” one, it will be automatically defined with what you choose here : 

 

But the “Accept” one might need to be defined, like this : 

 


Another thing, the documentation asks for parts that should be called “files” : 


But it seems like you called yours “Local File” :

 

That’s why you have the error that we could interpret as “missing the ‘body’ or ‘files’ key”

You should change that too


francisco_1988
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • August 18, 2025

The header part of the request is documented here : 

 

You don’t need to set the “content-type” one, it will be automatically defined with what you choose here : 

 

But the “Accept” one might need to be defined, like this : 

 


Another thing, the documentation asks for parts that should be called “files” : 


But it seems like you called yours “Local File” :

 

That’s why you have the error that we could interpret as “missing the ‘body’ or ‘files’ key”

You should change that too

Thank you!