Set up of my website smtp workspace

Hello,

Informations:

CMS: I have a wordpress website created since june 2024.

hosting: My host is hostinger.

Email sender: WP SMTP. I set the free plugin and I used to received emails and each event occurs on the site (sign up, sell, booking…)

Since Yesterday, My google business profile is enabled. So, I am trying to set up email sending with Wp SMTP. I have developped an app and put the credentials But, I always receive the message below:

Attention ! Le dernier e-mail que votre site a tenté d’envoyer n’a pas abouti.

> Source de l’e-mail : User Verification> Mailer: Google / Gmail> {> "error": {> "code": 401,> "message": "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.",> "errors": [> {> "message": "Login Required.",> "domain": "global",> "reason": "required",> "location": "Authorization",> "locationType": "header"> }> ],> "status": "UNAUTHENTICATED",> "details": [> {> "@type": "type.googleapis.com/google.rpc.ErrorInfo",> "reason": "CREDENTIALS_MISSING",> "domain": "googleapis.com",> "metadata": {> "service": "gmail.googleapis.com",> "method": "caribou.api.proto.MailboxService.SendMessage"> }> }> ]> }> }>

For more details please try running an Email Test or reading the latest error event.

I have add the code on this documents to my wp code without any resulsts. https://developers.google.com/identity/sign-in/web/sign-in?hl=fr

I need your support to solve this issue.

Best regards!

1 Like

@AssomeFSP as of March 14, less secure apps using username and password no longer work. See https://support.google.com/a/answer/14114704?hl=en.

You should use a plugin that support OAUTH2 or look at app passwords: https://support.google.com/accounts/answer/185833?hl=en

HTH, KAM

1 Like

Thank you very well for the response. Finally, i have purchased wp smtp pro
plugin. The set up has been automatically done buy them. Thabk you for your
support.

I met à similar issue with my gmail adress authentification with make. I
am still on the need. So, If you can assist on that, it will be wonderful.
Best regards!

@AssomeFSP You’ll have to describe your issue with make better but happy to try. -KAM

Thank you. After doing the nécessaire and get an ID client et secret, I
put them on the dedicated spacieux on make. When I tried the connexion with
my Gmail accojnt, it was blocked.

@AssomeFSP

I’m afraid I don’t work with Gmail much for freemail and this is a forum for Google Workspace. You might want to go talk to the Gmail product forums at https://support.google.com/mail/community?hl=en -KAM

Thank you very well. I am a google workspace beginner too. Any ressource
which can facilitate my work will be appreciated.
Best regards !

I had the same question while trying to configure WP SMTP with Gmail for my WordPress site. I followed the same process of creating the app in Google Cloud, adding the credentials, and pasting them into the plugin, but I kept running into the exact same 401 UNAUTHENTICATED error. The message about “missing required authentication credential” and “Login Required” kept showing up even though everything looked correctly configured.

It seems like the issue is tied to the OAuth setup, because the plugin isn’t able to get or refresh the access token properly. I also tried following Google’s documentation and even adding code snippets, but the emails still failed to send. From what I’ve read, the whole process of enabling Gmail API, setting up OAuth client IDs, and making sure the redirect URIs in WordPress exactly match the ones in Google Cloud is very sensitive — one small mismatch and it fails.

If you’ve found a reliable fix, especially regarding how to handle the credentials or refresh tokens so they stay valid, I’d really like to hear about it too.

Is there anyone who can help me with this?