Configuring OAuth 2 for Sendgrid event webhook

Viewed 390

I’m totally new to OAuth 2 but my current task requires me to use it to authenticate request from Sendgrid event webhook. The only manual I found is this:

https://docs.sendgrid.com/for-developers/tracking-events/getting-started-event-webhook-security-features#oauth-20

And I tried the following:

1. I tried creating a new OAuth 2.0 Client IDs from google cloud console

I got the json file which contains: client_id, client_secret, token_uri; then I inputted them to Sendgrid.

Manage OAuth 2.0 using Sendgrid UI

However, when I tested it (by clicking the “Test your intergration”), nothing was sent to my endpoint. I think that sendgrid couldn’t get the access token from the OAuth service or authorization server so it didn’t send any request to my URL.

2. I tried creating a Auth0 account and I also got client_id, client_secret, token_uri

I tested it again and nothing is sent to my endpoint, but this time, when I checked the log from Auth0, I saw this error:

No audience parameter was provided, and no default audience has been configured.

1 Answers

Faced with the same issue. On the Auth0 side, we can set 'default audience' on the Tenant level (not on each application). It isn't enjoyable. On Sendgrid they don't send audience param (they expect that you can fetch access token only by client id and client secret)...

Related