#current_webhook-401

1 messages ¡ Page 1 of 1 (latest)

jade fossilBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1233508064112672809

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

astral boneBOT
somber ingot
#

Where are you getting that 401 unauthorized error?

#

Is that when we attempt to send the event to your endpoint?

hardy hound
hardy hound
somber ingot
#

Gotcha. Looks to be a server config issue though

#

Not a stripe issue

#

Not really familiar with that platform unfortunately

hardy hound
#

@somber ingot well looks llike there is a mismatch between the webhook api version and the one set in my app

export const stripe = new Stripe(process.env.STRIPE_SECRET_KEY ?? "", {
  // apiVersion: "2022-11-15",
  apiVersion: "2024-04-10",
  typescript: true,
});
#

But I think I had the correct one before. Gonna delete this one and check if it makes a difference

somber ingot
#

It shouldn't

#

It's an issue with your server if you get 401 any time you try to make any request to it

hardy hound
#

@somber ingot actually it's not a 401 when I use curl

somber ingot
#

What is it?

hardy hound
# somber ingot What is it?

When I Curl the webhook endpoint: it response with a bunch of html, it does say Authentication Required in there but it's not a 401 which is what Stripe is showing in it's logs

somber ingot
#

What's the status code

#

Usually authentication required is 401

hardy hound
#

Oh yeah it is a 401 :/ needed to add another flag to curl to see it

somber ingot
#

And you don't throw a 401 error in your code, right?

#

Or any kind of authentication required error?

hardy hound
#

looking

astral boneBOT
hardy hound
#

really doesn't look like it

#

I just added a new api route so I'm gonna curl that and see if I get the same result

magic smelt
#

current_webhook-401

hardy hound
#

@somber ingot got it thanks for your help! yeah it was a Vercel (not next.js) security parmeter