Support » Plugin: WP Mail SMTP by WPForms » Issue with 400 Error Message when trying to authenticate

  • Resolved secptaadmin

    (@secptaadmin)


    Hello –

    I’ve followed your instructions closely, but the plugin is generating a 400 error with Google when I try to authenticate at the last step. The 400 error says

    “Error: invalid_request

    Missing required parameter: client_id”

    No extra characters in the ID or secret code that I can see. I’ve also ensured that any other plugin that I had installed is not using the OAth with google (i.e., I’ve disabled them…there were a few related to logging into wordpress and using google drive/apps). Can you help? See below for error log

    There was a problem while sending a test email. Related debugging output is shown below:

    Versions:
    WordPress: 4.9.4
    WordPress MS: No
    PHP: 7.0.25-0ubuntu0.16.04.1
    WP Mail SMTP: 1.2.5

    Params:
    Mailer: gmail
    Constants: No
    Client ID/Secret: Yes
    Auth Code: No
    Access Token: No

    Server:
    OpenSSL: Yes
    PHP.allow_url_fopen: Yes
    PHP.stream_socket_client(): Yes
    PHP.fsockopen(): Yes
    PHP.curl_version(): Yes

    Debug:
    Error while sending via Gmail mailer: Error calling POST https://www.googleapis.com/gmail/v1/users/me/messages/send: (401) Login Required

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Slava Abakumov

    (@slaffik)

    @secptaadmin

    It’s a known issue, that sometimes client_id is missing.
    So far I think that the issue is with the other plugin, that has Gmail API bundled inside. There is no easy fix at this time (except switching temporarily to Other SMTP mailer).
    In WP Mail SMTP 1.3.0 this conflict will be resolved.

    sagar1990

    (@sagar1990)

    Hi Slava,

    I just updated the plugin to 1.3.1 and still facing the same issue. I have generated the client id and secret key. But when i click on authorize button, it takes me to 400 error page.

    Plugin Author Slava Abakumov

    (@slaffik)

    @sagar1990

    Please provide here a list of active WordPress plugins on your site, I assume that you are using the latest version of each of them.

    Do you see exactly the same error as the topic starter or something different? Please provide a screenshot.

    sagar1990

    (@sagar1990)

    Thanks for the reply! I sorted it out. I updated all the other plugins and this one as well with new updates pushed an hour back.Created new app in gmail and now email is working.

    Thanks ! 🙂

    Plugin Author Jared Atchison

    (@jaredatch)

    Happy to hear that. Thanks for reporting back.

    Have a great weekend! 😎

    Get Support on Gmail error 400 issues or get on call support on how to fix on gmail error 400 issue

    400.Error: redirect_uri_mismatch
    Error: redirect_uri_mismatch

    The redirect URI in the request, https://jobcosupply.com/wp-admin/options-general.php?page=wp-mail-smtp&tab=auth, does not match the ones authorized for the OAuth client. To update the authorized redirect URIs, visit: https://console.developers.google.com/apis/credentials/oauthclient/47849395586-i92nhnnsdvkunllcq7u8fa56cd0u4u95.apps.googleusercontent.co

    I have switched the site address from http: to https: and back, but I keep getting the same error.

    Tom Belknap

    (@dragonflyeye)

    I can confirm, somewhat drearily, that this remains an issue.

    Joshbaker

    (@joshbaker)

    Is this just an issue with gmail accounts?

    I use gmail but use the option:
    Other SMTP

    You can then just put in the details
    SMTP HOST: smtp.gmail.com
    Encryption: SSL
    SMTP port: 465
    Auto SSL: on
    Authentication: on
    SMTP username: gmail emails address
    SMTP password: gmail password

    Plugin Support Jess Quig

    (@jquigam)

    Hi Tom and Josh,

    I apologize for the trouble here! You’re each working in different mailers, and so my responses to each will be different as well.

    Gmail Mailer (Tom)

    When we dug into this issue, the solution we found was to:

    1) Open your Google App settings back up (in case it helps, you can find details on the original app setup in our doc).

    2) Edit your existing app settings — specifically, the Authorized Redirect URIs. Recopy this value from your WP Mail SMTP settings (under WP Mail SMTP > Settings) into your Google app settings. Here’s a screenshot showing where you need to add this value.

    Our team is also working on an update to hopefully help others avoid/resolve this issue, but this should provide a fix for you right away.

    Other SMTP Mailer (Josh)

    The Other SMTP mailer can be used with Gmail emails, however we don’t recommend this as a first choice because it’s not as secure as using an API (which all of the other mailers use). Traditional SMTP like this is also more prone to server-based issues (configuration issues that often require the help of your hosting provider to fix).

    If you haven’t gotten any mailer totally up and running yet, then I’d specifically recommend using either Mailgun or SendGrid. These APIs are the most reliable from our extensive experience supporting these various options.

    I hope this helps!

    And if either of you have additional questions, please be sure to open a new support thread (otherwise, everyone else on the thread will receive likely unwelcome notifications each time anyone replies here). But we’d be happy to assist further from new support threads.

    Thanks!

    I had this exact same problem so it hasn’t yet been fixed. Trying to use Gmail. The fix suggested of just re-entering the exact same Authorized Redirect URI in my Google API account worked. No idea why – it was definitely the same one that was already there because it wouldn’t let me add it as it said dupliucates weren’t allowed. I deleted it and then re-entered it and now it works fine.

    Plugin Support Sanjeev Aryal

    (@sanzeeb3)

    Hi @fotherda,

    Glad to hear that you got it sorted and thank you for taking the time to let us know.

    Have a good one!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Issue with 400 Error Message when trying to authenticate’ is closed to new replies.