#IsmailSarikaya-oauth
1 messages ยท Page 1 of 1 (latest)
By the way, I am sending the code from the url that stripe sends to me, which is set from app settings.
hi! are you sure you're using the right secret key sk_test_xxx (of your platform account) when making the call? Could you share a bit of the code you have written to take the authorization code from the incoming URL and then pass it to that API so I can see if anything jumps out as unusual?
yes I am sure I am using the right secret key because I can make other requests with the same key as well. I will share
var options = new OAuthTokenCreateOptions
{
GrantType = "authorization_code",
Code = "ac_lv5zqmafcaofhyfhapkeitsdvjrmau70"
};
var service = new OAuthTokenService();
var response = service.Create(options);
it gets the exception here
makes sense โ so how do you get the Code variable? it's hard coded there, where do you actually get it from programtically?
or if you're doing it manually for now, maybe you are missing characters when you copy and paste it , for example
As I said I get the code directly from the url
yep, can you show me how you do that exactly? what code do you use to parse the URL query parameters and get the value? (maybe there's a bug in that code and it mangles the value somehow)
I understand you ๐ but for now I am doing it manually
I mean
....auth?scope=read_write&code=ac_lv5zqmafcaofhyfhapkeitsdvjrmau70
here is the returned url so I copy the code after code= and then paste it to my c# code manually.
maybe you are missing characters when you copy and paste it , for example?
Is it possible?
could be! you'd have to double/triple check that
Ok I checked but it doesn't work
So can you check if it really exist or not?
For example:
ac_lv5rs6ddlqjpcnefxs5fthxjexkgbynr
I just got this code and 5 mins did not last
yeah I'm checking though I don't think I can see all the logs for this, give me a bit
Sure
yeah we don't really log the actual codes, though I can see your failed requests. Can you give more context, what guide are you following and how do you create the OAuth link exactly?
(also I should mention there are very few reasons to use OAuth with Stripe, it's mostly deprecated)
I am developing a system about golf players and coaches. So we want coaches to connect us with stripe connect.
I actually used the OAuth to connect existing stripe account to us.
And I have also some other questions. When I create an account, Stripe does not prevent me to create it with the same email address? Does it make sense?
I assume in the actual URL the client_id is an actual ca_xxxx value? can you share what it is?
Yes it is:
ca_LT8alg7owCIvJ9FG4eFyZl75HZyNWicA
thanks
yeah that's the 'right' value. Hmm. I'm a little lost on why this isn't working , to be honest, feels like it should be
I feel like you ๐ it should work
So is there any other way to connect existing stripe users without using OAuth?
generally you're not supposed to connect to existing accounts, what happens instead is that when you connect, if the user has an existing Stripe account, a new Stripe account is created under their same email address and your platform gets access to that one instead
(that's what happens when using https://stripe.com/docs/connect/standard-accounts)
If I don't have to use OAuth, I will not use it
I read that doc but I didn't get how to handle.
Is there any example project that shows how to handle all these steps? I mean one project that contains every step.
And how about creating accounts with same email? I can do that and it doesn't look to me correct, am I right or missing something?
as far as I know that's not possible, you're supposed to get prompted to log into the existing account if you try to create a new account with the same email
but it really depends on the exact set up and type of account and so on, it's complicated
I will check that, thanks.
For example, I am not getting any error when I execute following code:
AccountCreateOptions options = new AccountCreateOptions
{
Country = "SE",
Type = "standard",
Email = "ismail17_71@hotmail.com"
};
AccountService accountService = new AccountService();
Account account = accountService.Create(options);
It creates accounts with the same email and I can see them when I get all accounts. This make me confused.
What is the right way to create an account? I copied these code directly from stripe's doc on internet.
in test mode I think it's not enforced
that is the right way!
Hmm you may be right. Let me also try when we activate our account.
Ok thanks for now. I will try to do without using OAuth and check the project you gave me.