Solved

Create valid custom SMTP channel?

  • 29 September 2023
  • 1 reply
  • 31 views

Hello everyone!

I am trying to execute the process of custom SMTP channels creation, using the API. I am having trouble trying to setup a custom smtp channel that is validated and is properly configured (smtp server, port,...).

With api2.frontapp.com/inboxes/XXXX/channels I manage to create an smtp channel, but it’s not valid, and the SMTP settings I send in the JSON body are not set up (although they are taken by the request).

With api2.frontapp.com/channels/XXXX/validate I am able to validate that newly created channel according to the response, but in Front’s UI I am still required to send the validation test email.

Trying to use PATCH api2.frontapp.com/channels/XXXX is not valid, since I cannot setup the custom SMTP settings for the channel that way (only a handful of settings that I don’t need).

Am I doing something wrong here, or is the process I’m trying to do not possible to execute via the API?

Thank you very much.

icon

Best answer by jason 30 September 2023, 01:15

View original

1 reply

Userlevel 4
Badge +7

Hi Kenneth, 

The API is permissive in that it allows you to send anything in the payload of your request, but it will ignore any parameters it doesn’t handle (so your SMTP credentials are simply being ignored).

The /validate endpoint is telling Front to send the validation email to your address. You’re getting the success response, because your request to the API was successful, not necessarily the validation process itself (validation requires Front sending an email, your mail server receiving it and redirecting it back to the Front forwarding address for your channel).

Unfortunately the API doesn’t support having custom SMTP credentials configured via the API, so this will still need to be done manually in the app.

If you’d like to see this feature supported via the API, please feel free to share it in our Product Ideas forum

Reply