#ecu_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/1242531649866961056
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello! That means, at some point, you enabled Connect in the Stripe Dashboard. You need to create a separate Stripe account and use that one instead. You can create a new account by clicking on your account's name in the Dashboard to pull up the account switcher, then select the option at the bottom to create a new account.
I see, so this might have happened a long time ago
Yep, could have happened at any time.
is it OK if I ask a few more questions about what I'm building?
Sure!
So I'm building Potio.cc which allows users to run pricing experiments on Stripe. We've built our own pricing table system (similar to Stripe but more complex/feature rich).
Now I need to be able to run some basic requests on the behalf of the user. For now I need access to all the prices and products of a user. I take that these permissions are the correct ones: plan_read & product_read.
I should just be able to create a stripe app that asks for these permissions, and then I should have access to that data on my users' behalf?
Yep.
thank you!
I contacted Stripe support multiple times about this (or similar) issue and they didn't understand at all what I was talking about. It's so great to be connected to actual development help now.
That's why we're here. ๐
For testing, I'd like to redirect myself to localhost. But it doesn't allow me to add a host that's on http:// which localhost is. Do you know if I need to add localhost even, or I can just redirect to it always?
"allowed_redirect_uris": [
"https://app.potio.cc/"
],
I'm not sure, let me check...
To clarify, you tried to add http://localhost to allowed_redirect_uris and it wouldn't let you?
I do get this when I try "localhost:1234" and "http://localhost:1234"
Yes, it said It needs to be on https
Yeah, that makes sense. I don't think there's a way to do this part locally.
I think this doc touches on it: https://docs.stripe.com/stripe-apps/reference/app-manifest
has some example with http://localhost:8888/v1, it's a bit of an advanced use case though, so I will give it a go
Right, but that's not for the OAuth process.
true
might need to create a redirect from a public https page to localhost
I would expect redirect to localhost to work tbh, that's how I usually see it in other APIs
Yeah, I'm not sure why we don't allow it there. Asking internally, but may not get an answer anytime soon.
Regardless I'll flag it as feedback internally.
I ended up simply copying the URL parameters part from production URL to localhost for now. Works well enough for testing.
I do have a question about actually exchanging the authorization code parameter for an API access token and the refresh token.
I am trying to use this library for it: https://github.com/badgateway/oauth2-client
I see from the cURL example in your docs that you set a user like this sklive xxx. I'm unsure what the sk_live code is and what it matches in the actual oauth2 nodejs client, because that has clientId and clientSecret
Hello
sk_live is a prefix for your Stripe account's live mode Secret API key
I can set sk_live as clientSecret and just omit clientId?
I'm not sure, is there a guide you're following for this?
this one, it recommends I choose a oauth library: https://docs.stripe.com/stripe-apps/api-authentication/oauth#url-parameters
- Exchange the authorization code for an access token
This part
I see. I'm not familiar with the oauth2 client you're using but you can give it a try