AngularM AngularM - 27 days ago 42
Node.js Question

SendGrid API Key not working. "The provided authorization grant is invalid, expired or revoked"

Send Grid seems to be preventing my node js server sending emails.

I get this error message in the response on sending of an email:

"The provided authorization grant is invalid, expired or revoked"

I have an API key setup as well and have followed the documentation.

Answer

You need to use the API KEY GENERATED

enter image description here

DO NOT USE the API KEY ID

enter image description here

Sendgrid only displays the generated key once when you create it. enter image description here

If you didn't record it somewhere when you created the key you'll need to create a new key and then you'll probably want to delete the old key since it would be useless if you don't know what it is.

FYI: The API key in the screenshot above is already deleted. I deleted it right away so please don't worry about me leaking that key.