PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → OAuth2 Refresh token
OAuth2 Refresh token
Débuté par Jim, 27 déc. 2024 20:35 - 1 réponse
Posté le 27 décembre 2024 - 20:35
We are able to get an access token and use it to send an SMTP email on both Google and Microsoft 365.
We are stuck on refresh tokens.
We are needing to replace the email alerts in our software. SMTP with basic authentication is almost gone.

Is it possible with WinDev to get refresh tokens and send emails without the users needing to reauthenticate manually?
Our software runs as a Windows service and sends alert emails if parameters get out of range.
Are there any examples out there?

Thanks

Jim
Posté le 14 janvier 2025 - 16:09
OK we have that solved now. If anyone needs assistance we may be able to help.
We were able to grab the tokens with SMTP but you cannot send emails via SMTP unless you use the full scope which I doubt
Google will allow when we try and publish this.
We used the send only scope (https://gmail.googleapis.com/gmail/v1/users/me/messages/send) using HTTP post vs. SMTP.
It does work. Our last hurdle is attaching a file using the POST method.


Jim