• Resolved dougremien

    (@dougremien)


    After using WP Mail SMTP to get my Client ID and Client Secret, I’m receiving the following authorization error from Gmail:

    Error 403: access_denied
    The developer hasn’t given you access to this app. It’s currently being tested and it hasn’t been verified by Google. If you think you should have access, contact the developer ([email protected]).
    Learn more
    Request Details
    ? access_type=offline
    ? response_type=code
    ? redirect_uri=https://connect.wpmailsmtp.com/google/
    ? state=https://luana-lamour.nl/wp-admin/options-general.php?page=wp-mail-smtp&tab=auth
    ? client_id=284053503991-6vf8at0k4vatp3m6qlenmrdn82qg6nhj.apps.googleusercontent.com
    ? include_granted_scopes=true
    ? prompt=consent
    ? scope=https://mail.google.com/

    As you can read from above the error message is asking me to contact the developer to ([email protected]) to gain access, but I am that developer.

    I have installed and set up WP Mail SMTP many, many times and have never received this error. I’m stumped.

Viewing 15 replies - 1 through 15 (of 23 total)
  • Plugin Author Gregor Capuder

    (@capuderg)

    Hi @dougremien,

    hmm… when does this error message occur? Right after you click on the “Allow plugin to send emails using your Google account” button in the plugin, or does it occur between the oAuth steps?

    Could you please try to create a new API project in the Google Developer console and try with a brand new oAuth app to configure our plugin?

    Take care!

    Thread Starter dougremien

    (@dougremien)

    The message is appearing on the final step after i have entered the client ID and client secret. So yes, the 403 error message displays immediately upon clicking the button to “allow plugin to send emails using Google account”. I have also tried to create a new API project and complete the process again but I continue to get the same message.

    Plugin Author Gregor Capuder

    (@capuderg)

    Hi @dougremien,

    are you maybe logged into different Google accounts (normal gmail and g-suite accounts) in the web browser you are using?

    Please make sure you created the Google oAuth app in the correct Google account, by selecting the account in the top right corner when you visit the Google Developer Console.

    When the app is created with the correct Google account, please also use that account to authenticate when creating the connection in our plugin.

    This is a new error that we’ve never encountered before, so we don’t really know what is causing it. I’ve tried to reproduce it with different scenarios, but I never got the error you did. ??

    Thank you for your patience.

    Have a nice day!

    Hello,

    I am also having this same problem when clicking on “allow plugin to send emails using Google account” and the message appears:

    EMAIL DELIVERY ERROR: the plugin WP Mail SMTP v2.5.1 logged this error during the last time it tried to send an email:

    Mailer: 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”
    }
    }
    Consider running an email test after fixing it.

    Thread Starter dougremien

    (@dougremien)

    No, I am not logged into any other email accounts. And yes, I am selecting the correct Google account. The error message is the same

    Plugin Author Gregor Capuder

    (@capuderg)

    Hi!

    @derikdantas yes, that error showed up, because your WP site tried to send an email, but the authorization process is not complete. Once this original error is resolved and you are able to complete the authorization process, the emails should send OK and the error notice will disappear.

    @dougremien I found this other forum topic while Googling this issue. And the proposed solution is:

    You need to go to the OAuth settings on the left side in your developers console. Then publish your app so that it goes from “test” to “production”.

    I’ve looked at my oAuth app, but I can’t find this setting… Could you please check if you maybe have it? Is this Gmail account you are using a new Google account?

    If there is such a setting (to publish an app), could you please take a screenshot of it and let us know where it is, so other users with this issue could find it easier?

    Have a nice day!

    Hello,

    @capuderg

    “Você precisa ir para as configura??es de OAuth no lado esquerdo do console do desenvolvedor. Em seguida, publique seu aplicativo para que ele vá de “teste” para “produ??o”.”

    This worked for me.

    Thanks.

    Plugin Author Gregor Capuder

    (@capuderg)

    Hi @derikdantas,

    that’s great! Thanks for sharing! ??

    Could you maybe share a screenshot of where exactly you find the button to switch to the production mode? I don’t have that option in my oAuth app…

    Thanks and have a nice day!

    Thread Starter dougremien

    (@dougremien)

    Your suggestion worked! The “Publishing status” section is located on the OAuth Consent Screen. It was set to “testing”, so I changed the setting to “published”. Here is a link to a screen grab:https://nimb.ws/nqp3VB

    Thread Starter dougremien

    (@dougremien)

    Thanks again for your help!

    Thread Starter dougremien

    (@dougremien)

    Since my last post I checked 9 other websites where I had zero problems with setting up WP Mail or getting Google authorization. And what’s strange is that on all of them the “publishing status” section to switch to production mode isn’t present (I couldn’t find it on the OAuth Consent Screen). It was only present on the one website I had trouble with. Perhaps it’s only visible when an Error 403 is issued?

    Plugin Author Gregor Capuder

    (@capuderg)

    Hi @dougremien,

    thank you for letting us know the solution and where to find it! We really appreciate it.

    Yeah, I couldn’t find this setting in my oAuth app as well. Even when I created a brand new project and app…

    I guess this is something new from Google that they are starting to roll out?

    Thank again and have a nice day!

    @dougremien THANK YOU! I was also struggling with this for hours. I set up this connection dozens of times and never had to do this. Never would have figured that one out, thanks again!

    I ran into this too.
    I didn’t want to publish anything though, as it gave me warnings about being open to anyone.

    Instead I added the email address of the account I was wanting to use (the one I registered the credentials etc with) to the Test Users. Then it worked fine with no 403, and I managed to send an email successfully.

    Screenshot of add test users, hosted on ibb.co, will delete after 1 week

    I have two gmail accounts that I tried this on. A 10+ year old gmail account had different ui and options. My 3 week old gmail account had new stylings and gave me these options. Neither of them looked like the gmail setup guide I was trying to follow here https://wpmailsmtp.com/docs/how-to-set-up-the-gmail-mailer-in-wp-mail-smtp/

    hope this helps.

    Plugin Author Gregor Capuder

    (@capuderg)

    Hi @rjktlf,

    thank you very much for sharing this information!

    Could others also please confirm they are using new Gmail accounts? So we know if this is the reason for this new “Testing mode” in the oAuth app.

    Have a nice day!

Viewing 15 replies - 1 through 15 (of 23 total)
  • The topic ‘WP Mail SMTP authorization error 403’ is closed to new replies.