I am trying to integrate stripe connect in my application here is reference url (https://stripe.com/docs/connect/oauth). Here they have specified to post authorization code after user have created account
curl -X POST https://connect.stripe.com/oauth/token \ -d client_secret=sk_test_BQokikJOvBiI2HlWgH4olfQ2 \ -d code=AUTHORIZATION_CODE \ -d grant_type=authorization_code
here i have client secret and authorization code but when i do ajax post like below
$.ajax({
type: "POST",
dataType:"json",
url: "https://connect.stripe.com/oauth/token/",
data: {client_secret:"sk_test_gcpX7F3XXXXXXXXXXXX",code:"ac_43xnkqCpBtNu6ywXXXXXXXXXXX",grant_type:"ac_43xnkqCpBtNu6ywqLXXXXXXXXXXXXXX"},
success: function(resp) {
alert(resp);
}
});
I am getting error like 301 moved permanently, Even I don't now can i do ajax post or is there any way we can do this instead of js
can any one help me in getting user account details using accesstoken.