stripe / stripe-apps

Stripe Apps lets you embed custom user experiences directly in the Stripe Dashboard and orchestrate the Stripe API.
https://stripe.com/docs/stripe-apps
MIT License
148 stars 73 forks source link

`stripe apps secrets` is a documented CLI command, but not available #952

Closed tvanantwerp closed 9 months ago

tvanantwerp commented 9 months ago

Describe the bug

The API docs have examples for how to interact with the Secret Store from the Stripe CLI. But these examples do not work.

stripe apps secrets find  \
  --name="example" \
  -d "scope[type]"=account
Unknown command "secrets" for "stripe apps".
See "stripe apps --help" for a list of available commands.

To Reproduce Steps to reproduce the behavior:

  1. Install the Stripe CLI and the Stripe Apps plugin for the CLI
  2. Go to the API documentation for the Secret Store and change the example code to use the Stripe CLI
  3. Attempt to use one of the documented examples, e.g., stripe apps secrets find ...
  4. Get the error Unknown command "secrets" for "stripe apps".

Expected behavior Expect to receive an API response with Secret Store data matching the documented behavior.

Screenshots

image

Desktop (please complete the following information):

Additional context Stripe CLI was installed on macOS using homebrew. No other unusual behavior has been observed while using the Stripe CLI and the Apps plugin.

gabrielhurley-stripe commented 9 months ago

That was added to the docs erroneously. The command does not actually exist! We'll remove it from the docs.

The information in https://docs.stripe.com/stripe-apps/store-secrets are the correct examples of how to interact with Secret Store.

If there's a use case you'd like to see supported in the CLI, we'd be interested in understanding the feature request.

Thanks!

tvanantwerp commented 9 months ago

@gabrielhurley-stripe My use case was customer support for a Stripe App. We were storing some configuration settings in a secret, and I wanted to check if these configuration settings might have errors in them that were causing an issue for them. Using the Stripe CLI would've been an easy way to fetch that secret to view the settings. I didn't particularly like using a production API key on the app account to locally request the connected account's secret via API endpoint. Having a way to do this via the CLI would be quicker, and more secure since I wouldn't need that API key.