Support » Plugin: WP Mail SMTP by WPForms » Error when authorizing plugin from settings page

  • Resolved StanfordAlan



    I followed your directions exactly (I think) twice to set up this with Gmail. I get an error before I can even try to send a test email.

    After I entered and saved my Client ID and Client Secret keys, I hit save. Then, I clicked the Allow plugin to send emails using your Google account button. When I do that, I get this error:

    400. That’s an error.
    Error: invalid_request
    Missing required parameter: client_id
    Learn more
    Request Details
    That’s all we know.

    I used the correct information off both sites, and the keys don’t have spaces. I’m at quite the loss. As I said, I’ve tried this twice now.

    If I do try to send a test email, the returned error message is that I’m not logged in, which isn’t a surprise.

    WordPress: 4.9.2
    WordPress MS: No
    PHP: 5.6.33
    WP Mail SMTP: 1.2.2
    Mailer: gmail
    Constants: No
    Client ID/Secret: Yes
    Auth Code: No
    Access Token: No
    OpenSSL: Yes
    PHP.allow_url_fopen: Yes
    PHP.stream_socket_client(): Yes
    PHP.fsockopen(): Yes
    PHP.curl_version(): Yes
    Error while sending via Gmail mailer: Error calling POST (401) Login Required

    Any ideas?


Viewing 15 replies - 1 through 15 (of 26 total)
  • Having this same issue. Some help would be much appreciated.

    Plugin Author Slava Abakumov


    Make sure any caching plugins are not activated.
    Also, remove them (some plugins clears its data after removal).

    Are there any other plugins installed, that works with Google API?

    The only other Google related plugin I have installed is Google Analytics. No caching plugins.

    Plugin Author Slava Abakumov


    Which exactly plugin for GA? I see lots of them here.

    Thread Starter StanfordAlan


    Thanks for the reply.

    For Google Analytics, I have Google Analytics Dashboard for WP (GADWP) installed. The only caching plugin I have installed is CloudFlare.

    I deactivated both, paused CloudFlare, refreshed, reentered the information, and saved again. I received the same error from Google.

    @StanfordAlan (@stanfordgriffith)
    Try removing other WordPress plugins that are not used.
    I had the 401 error and removed the BackUp plugin. Now GMail works.

    401 error shows
    “code”: 401,
    “message”: “Login Required”

    Plugin Author Slava Abakumov



    Thanks for the info!
    Was it BackWPUp or BackUpWordPress plugin? Could you please provide a link to it, so I could test it.

    It was BackWPUp and I forgot to add that I also removed a SMTP plugin “Easy WP SMTP” ?

    Is there anyway of seeing what plugins have been removed so I can get the exact name of the SMTP plugin.

    Plugin Author Slava Abakumov



    You’ve just pinged another user on a forum 🙂

    It’s a known issue that other SMTP-related plugins contradict with each other and WP Mail SMTP. BackWPUp plugin should NOT actually be a reason, I suspect the one SMTP plugin.
    Thanks for the heads up.
    I’m thinking of how to inform users that other known plugins may be a reason for compatibility problems.

    I’m not sure if my problem is directly related, but it’s the same error as the OP (something about missing the client_id), so I thought I’d share what I found.

    I also have BackWPup installed, and many other plugins – none related to SMTP though. I didn’t try deactivating BackWPup though and I’ve already got around the issue so I can’t test that, but I can explain what I did to fix the issue for my particular case – maybe it will help someone.

    The issue is that the client id was not being sent to Google when clicking the “Allow plugin to send emails using your Google account” button, and I’m a developer so I looked into the code. Inspecting the button’s link showed me that indeed the client id was not there.

    I’m not sure what would cause this (especially how it could be a conflict with another plugin), but my solution was to edit the link (by inspecting it in the browser) and paste the client id where it should have been. Once I did that, I clicked the button, and everything worked as expected.

    I also tried to put the client_id into the URL because I confirmed it is missing (this should be reported as a bug!), and then got a different error from Google: Error: invalid_request OAuth 2 parameters can only have a single value: client_id

    Can anybody help fix this? Either with step-by-step instructions that are a bit more specific, or by fixing the plugin itself?

    Plugin Author Slava Abakumov


    @stanfordgriffith (if it’s still relevant to you)

    In order to troubleshoot further, I’ll need to collect more details. When you get a chance, would you please go to and click the ‘Complete a Form’ button on the right side? This will allow you to submit a ticket without a WPForms account. Please mention my name (Slava) in your message there, so I will be notified.

    Same issue on WP Engine Staging Site trying to replace SMTP Postman with your plugin. WP Engine lists this a preferred plugin for SMTP ala

    FYI – there is no caching on WP Engine staging sites as far as I know.

    Hey, we are having the same issue. Any updates?

Viewing 15 replies - 1 through 15 (of 26 total)
  • The topic ‘Error when authorizing plugin from settings page’ is closed to new replies.