Support » Plugin: WP Mail SMTP by WPForms » bad request, invalid grant

  • Resolved trader88888



    I’m having troubles determining what caused this… I see this message at the top of the wordpress backend pointing to this plugin… wondering if you can tell me more that could help?

    EMAIL DELIVERY ERROR: the plugin WP Mail SMTP v1.4.1 logged this error during the last time it tried to send an email:
    Mailer: Gmail
      "error": "invalid_grant",
      "error_description": "Bad Request"
Viewing 2 replies - 1 through 2 (of 2 total)
  • primitivenet


    Are you using GMail to send your emails?

    If so, this looks like you will need to re-grant permissions, so on the settings page
    Click the “Remove Connection” button

    Then click the “Allow plugin to send emails using your Google account” button and re-enable access.

    Plugin Author Slava Abakumov


    invalid_grant: bad request

    Leaving this for future reference.

    Normally means that the Client ID and Client Secret you are using to refresh the access token were not the ones that were used to create the refresh token you are using. Basically, you created the connection, then changed Client ID/Secret but old refresh token was left. Most likely this happens when migrating a database from local to live, or to a client etc.

    Remove the current connection and try to authenticate again to get a new refresh token. This should fix the issue.

    • This reply was modified 1 year, 11 months ago by Slava Abakumov. Reason: fix typos
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘bad request, invalid grant’ is closed to new replies.