252
Views
10
Comments
Solved
API/key method instead of SMTP method
Question
Application Type
Traditional Web
Service Studio Version
11.8.9 (Build 30790)
Platform Version
11.0.614

Referring to this Outsystems article on "Configuring Email with the STMP method in Service Center", I can't find where it can be configured to instead use an API/key method.

The reason for my question, is because of the following announcement:

  • We are emailing to inform you of an upcoming requirement to update your authentication method with Twilio SendGrid to API keys exclusively by December 9th, 2020 in order to ensure uninterrupted service and improve the security of your account. 
2016-07-13 20-45-58
Cyberflake
Solution

What I can highlight for you is how it is configured on our side as per below screenshots. Make sure you type in the API Key and not the API Key ID. You mentioned it is working with the older standard method using a username and password, so I assume that you have your SendGrid configured correctly with the approved public IP address of your Oustystems environment. 

SMTP Server: smtp.sendgrid.net

SMTP Port: 587

Username: apikey

Password: [your api key]

SendGrid:



ServiceCenter:


2022-07-25 08-42-14
Tiago Resende

Hi Cyberflake!

I believe that there is no way to configure it in the platform, since each e-mail service could use a different authentication through API. 

I would suggest you contact Twilio to re-check if SMTP will be deprecated, and then, look the options. 

To keep using it on Outsystems (without SMTP option) you will need to create integrations to autenticate and send e-mails, but, this way you will not using Outsystems Email service.

Regards,

Tiago Resende

2016-07-13 20-45-58
Cyberflake

Appreciate your time to respond. 

It is my opinion if Outsystems is planning to support the new standard and more secure method, then it's good but to know when but if they are not planning to support it, then that part of the Service Center will soon become pointless.

It appears all major email providers, such as Twillio/Sendgrid, Microsoft etc. are indeed moving away from the traditional SMTP auth method and opting in for API Key method, some have already stopped supporting the aforementioned.

Thanks. 

2022-07-25 08-42-14
Tiago Resende

You can open a Ticket to support, asking if it is on the road map for futures releases, but, as I said, in my opinion there is'nt a strong pattern for this, since this is an API... Sendgrid for example is using Bearer tokens, others can use only the Authorization header, Client Secret and so on... for Microsoft (Office 365) and AWS (SES) SMTP is in use nowadays.

2016-07-13 20-45-58
Cyberflake

Figured it out. 

All you have to do is to supply the username: APIKey and the key as the password. Done.

I suppose updating the Outsystems documentation with the above sentence would help (a lot).

Thanks.

2021-11-12 19-06-12
Trevor

Does this solution still work for you? I tried switching over one of our environments and I am getting an exception of "Bad username/password" when I try sending emails through one of our Outsystems modules.

2016-07-13 20-45-58
Cyberflake

Hi Trevor, yes it is working for us. It sounds like the problem is authentication with your email supplier that I assume it being Twilio SendGrid as well ? You have to make sure that you have an API key configured first with the same user account that you initially had configured and then set the security on that API key to allow to send emails. 

2021-11-12 19-06-12
Trevor

Yes I am also using SendGrid. I have an API key set up with full access but supplying it as the password in the Outsystems configuration doesn't seem to be working for me. Is this something Outsystems support suggested as a solution? I can't find anything in their documentation about using an API key instead of username/password.

2016-07-13 20-45-58
Cyberflake
Solution

What I can highlight for you is how it is configured on our side as per below screenshots. Make sure you type in the API Key and not the API Key ID. You mentioned it is working with the older standard method using a username and password, so I assume that you have your SendGrid configured correctly with the approved public IP address of your Oustystems environment. 

SMTP Server: smtp.sendgrid.net

SMTP Port: 587

Username: apikey

Password: [your api key]

SendGrid:



ServiceCenter:


2021-11-12 19-06-12
Trevor

Oh wow I found my problem. I had entered "APIkey" as the username instead of "apikey". Thank you for the very quick and helpful replies!

2016-07-13 20-45-58
Cyberflake
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.