LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sending Alert Emails with Gmail and OAuth 2.0

Hello everyone,

 

I recently received an email from gmail team stating that the option to use less secure apps is going to be discontinued. I have an application that monitors a DAQ board and send me an email whenever it crosses a certain threshold. I've been using it since 2010 with minor fixes, but the removal of the option for less secure apps will be a problem for me. I have no knowledge in web services in general, and didn't manage to find a complete solution, just an example that fetches the google account picture (https://stravaro.com/2020/01/oauth2-and-labview/). In this example, each time the application runs, a browser window pops up and asks for authentication, which defeats the purpose of the email as an event reporter.

 

I've been reading about creating some API's on google cloud and authorizing apps through it, but I'm far from understanding its inner workings.

 

So, my two questions:

Is it possible to programmatically send an email through LabVIEW using OAuth 2.0?

Is it possible to do it without a browser popup everytime the app runs or the token expires?

 

As a last piece of information, the app runs for months without stopping.

 

Thanks in advance

0 Kudos
Message 1 of 5
(1,815 Views)

Hello Giovanno,

 

I have the same problem. Did you manage to find a solution?

0 Kudos
Message 2 of 5
(1,568 Views)

It should be possible to get an application access_token (e.g. request it manually once), and then use that in the application.

 

OAuth 2.0 for Mobile & Desktop Apps  |  Google Identity  |  Google Developers

 

0 Kudos
Message 3 of 5
(1,547 Views)

Wiebe, thanks for the reply!

I will see if that works. 

0 Kudos
Message 4 of 5
(1,503 Views)

@manost wrote:

Wiebe, thanks for the reply!

I will see if that works. 


Good luck!

 

It seems to be hard, in any language, not just from LabVIEW.

0 Kudos
Message 5 of 5
(1,485 Views)