### [Error: Authorization Grant Invalid or Expired](https://wpmailsmtp.com/docs/sendgrid-authorization-grant-invalid/)

**Published:** June 1, 2026
**Author:** David Ozokoye

**Content:**

**Note**: This guide applies to the [SendGrid mailer](https://wpmailsmtp.com/docs/how-to-set-up-the-sendgrid-mailer-in-wp-mail-smtp/ "SendGrid") in WP Mail SMTP.

## What This Error Means

The API key in WP Mail SMTP is invalid, deleted, or missing the “Mail Send” permission that SendGrid requires to send emails.

## Common Causes

- You deleted or regenerated the API key in SendGrid without updating WP Mail SMTP
- The API key has insufficient permissions (needs at minimum “Mail Send” set to “Full Access”)
- Typo or truncation when copying the API key
- The API key belongs to a different SendGrid account
- The SendGrid account is suspended or under a sending restriction

## How to Fix

Here is the complete step-by-step guide to resolving the error.

### Step 1: Generate a New API Key in SendGrid

The fastest fix is to generate a fresh API key with the correct permissions and paste it into WP Mail SMTP.

Start by logging in to your [SendGrid](https://app.sendgrid.com "SendGrid") account. Then, in the left sidebar, click **Email API » Integration Guide**. Under **SMTP Relay**, click **Choose**.

Next, enter a name for the API key (e.g. “WP Mail SMTP”) and click **Create Key**.

![Create API key in SendGrid](https://wpmailsmtp.com/wp-content/uploads/2026/05/create-api-key-for-sendgrid.jpg)Finally, copy the generated API key immediately. SendGrid only shows the full key once.

![Generated SendGrid API key](https://wpmailsmtp.com/wp-content/uploads/2026/05/api-key-for-sendgrid-account.jpg)**Note**: Store your API key in a secure location. After closing this dialog, you can’t retrieve it.

### Step 2: Paste the New Key in WP Mail SMTP

With the new key copied, update the field in WP Mail SMTP.

Start by going to **WP Mail SMTP » Settings** and clicking the **General** tab.

![WP Mail SMTP settings page](https://wpmailsmtp.com/wp-content/uploads/2023/08/wp-mail-smtp-settings.png)Then, scroll to the **Primary Connection** section and select **SendGrid** as the **Mailer**.

![Select SendGrid as the mailer in WP Mail SMTP](https://wpmailsmtp.com/wp-content/uploads/2026/05/sendgrid-mailer.png)Finally, paste the new API key into the **API Key** field and click **Save Settings**.

### Step 3: Send a Test Email

Confirm the fix by sending a test email.

To test the fix, go to **WP Mail SMTP » Tools** and click the **Email Test** tab. Enter a recipient email in the **Send To** field, leave the **HTML** toggle ON, and click **Send Email**.

![Test email tab](https://wpmailsmtp.com/wp-content/uploads/2024/10/test-email-tab-1024x1002.png)Once done, look for the success message and confirm the email arrived in your inbox.

## Notes

- SendGrid API keys begin with `SG.` and are about 69 characters long. If your key doesn’t start with `SG.`, it’s the wrong value.
- If the error persists after replacing the key, check the SendGrid dashboard home page for account alerts. A suspended or restricted account fails regardless of key validity.
- If you need restricted permissions instead of full access, set “Mail Send” to “Full Access” at minimum.

That’s It! You now know how to fix the ‘Authorization Grant Invalid or Expired’ error in SendGrid and get your emails sending again through WP Mail SMTP.

**Categories:** SendGrid Errors, Error Library

---

