How can I create an FTP connection using the API?

Hello!

I need to create several FTP connections from our application that later will be used in different scenarios. This needs to be done with the Make API. I have searched and try different values, but I am still not able to get it done.

This is the command I am using:

curl -L -X POST "https://us2.make.com/api/v2/connections?teamId=99999" \
  -H "Authorization: Token xxxxx-xxxxxx-xxxxxx-xxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "accountName": "My FTP Connection",
    "accountType": "ftp",
    "host": "ftp-domain.com",
    "port": 21,
    "username": "myusername",
    "password": "MYPASSWORD",
    "secure": false,
    "rejectUnauthorized": false
  }'

I keep getting the same response:

{"message":"The request failed due to failure of a previous request.","code":"SC424","suberrors":[{"message":"Failed to verify connection 'My FTP Connection'. 530 Login incorrect.","name":"AccountValidationError"}]}

I know for a fact that the FTP credentials I am using are correct. It seems that the connection is created but not verified, however, it is never shown in the team account, and we can not interact with it.

What am I missing?

Hi @josemanuel, Welcome to the community. There is a ftp module in make.com which you can use if your goal is to just login to the ftp and access files from make.com

Thank you @abhilash_naik, I tested my scenario with the FTP module and it all works fine. What I need is to be able to create scenarios from my application using the Make API. That includes creating the FTP connections, which is what I am having problems with right now.

I got my answer from the support team.

“Unfortunately, it is not possible to create an OAuth 2.0 or FTP/SFTP connection with this API Endpoint. It works now only for connections that require only API keys.”

I will have to find another way to do what I need.

I am posting this in case someone else has the same question.

2 Likes