We've moved discussions to Discord

Stripe api_key_expired but it's not my key? [UPDATED]

Darren Smyth
Hi

UPDATE: I found the random key in ~/.config/stripe/config.toml

I did stripe login and it's now working. Apparently we have to refresh the keys every 90 days?

--> Original problem in case anyone else hits this

I have developed an interesting problem. When trying to start my development server, I now get this error (well I received it once and then it just crashed):

08:37:55 stripe.1  | 
08:37:55 stripe.1  | time="Wed, 09 Sep 2020 08:37:55 AEST" level=fatal msg="Error while authenticating with Stripe: Authorization failed, status=401, body={
08:37:55 stripe.1  |   "error": {
08:37:55 stripe.1  |     "code": "api_key_expired",
08:37:55 stripe.1  |     "doc_url": "https://stripe.com/docs/error-codes/api-key-expired",
08:37:55 stripe.1  |     "message": "Expired API Key provided: rk_test_uK****************************aMp5",
08:37:55 stripe.1  |     "type": "invalid_request_error"
08:37:55 stripe.1  |   }
08:37:55 stripe.1  | }

I've checked all my credentials and I have no idea where the r_test_uK key is coming from?

I have tested this with stripe listen on the command line and the same error is presenting. I updated all my brews last night and that seems to have broken it. I've reinstalled and nothing has changed.
 
Is there a way to downgrade a formula for stripe? I can't seem to find anything and it seemed to work before the upgrade.

Can anyone help me work this out? The Stripe docs aren't that helpful with this one.

UPDATE: I've been through to Stripe and it's been accelerated as there seems to be a problem. Waiting for them to get back to me.

Thanks

Darren
Chris Oliver
Stripe CLI keys expire in 60 or 90 days, so you have to refresh them. It's for your safety so you don't accidentally give your keys to someone else. Keys on the Stripe dashboard never expire IIRC, just the ones the CLI generates for you.
Notifications
You’re not receiving notifications from this thread.