#maykr_api
1 messages ยท Page 1 of 1 (latest)
๐ 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/1272488545411399744
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi! not entirely sure what you mean. You want the API key of the merchant account who installs your app?
yes but is there a specific reason you want to make it more complicated and require storing and securing a bunch of secret keys(one for each installed user) instead of just one(your account's, and then using the Stripe-Account header) to make requests?
what you're looking for in any case is either the OAuth or the Restricted API key approaches : https://docs.stripe.com/stripe-apps/api-authentication both of which can give you an API key that can be used to call the API on behalf of the installing account.
so my existing backend that syncs the data uses a api key so i was thinking of having it integrated inside so users can just install the app and not need to deal with adding keys and whatnot.
I checked the doc for restricted api key auth, and it seems that
- After the app is installed, it generates a restricted API key provisioned with the proper permissions.
- The user copies the generated keys and provides them to your site.
is there a way to get this automatically besides them providing it manually?
or is oauth better choice here?
yes, the automatic way is OAuth
Ok thanks mate, also on this side note, what is the way to add a webhook endpoint when the user installs the app?
I think if you're using the OAuth approach there's not really a need for a webhook since your server is actively involved in completing the installation so you'd know at that point it's installed
you can also use a Connect Webhook and listen to account.application.authorized https://docs.stripe.com/stripe-apps/events#app-events
๐ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!
actually we have webhook to get new data from the user via a endpoint, but more for this events, how would i actively read it for new data? (I want to create a webhook endpoint to read on my url when the app is installed) we are already reading the events data, if i am being confusing let me know.
I'm not sure I follow