#mac-cli-key

1 messages · Page 1 of 1 (latest)

sacred granite
#

Hello! Let me dig around for a few minutes...

#

To double check - you don't have a STRIPE_API_KEY environment variable set, do you?

feral fossil
#

I do

sacred granite
#

And what is the format of that key? is it also sk_test_xxx?

feral fossil
#

In this container I'm both running stripe listen (works great) and hoping to run stripe trigger

#

It is sk_test_xxx, same key as is in the config file

sacred granite
#

Hmmm... if you do stripe config --list do you see any keys that are not three parts?

feral fossil
#

Nope, there is only test_mode_api_key

#

If I run stripe login and stripe config locally on my laptop for example I see 4 3 part keys, 2 rk's and 2 pk's

sacred granite
#

Very strange... do you also get errors if you try this stripe trigger --api-key sk_test_xxx customer.created

feral fossil
#

Same error 😦 Tried that with a rk from my dashboard too

sacred granite
#

What version of the CLI are you using? And when you ran stripe login again did you also do a stripe logout?

feral fossil
#

Ok I think I may have figured out the issue but its still a bit confusing to me. I actually have STRIPE_API_KEY set to reference a secret that I publish via a script (the details of this aren't relevant) and if I manually set STRIPE_API_KEY to my sk_test_xxx everything works!

#

But this is kind of strange behavior regardless because it makes it seem like the --api-key param is not working as intended

#

Does STRIPE_API_KEY take precedence?

sacred granite
feral fossil
#

Ah missed that, I'll have to work around that with my docker config. Thank you!

sacred granite
#

👍