Hi friends,
Nowadays a trend is running like to register a user via his social login id.
For my purpose I am using paypal user.
Concept is a user come and click on login and redirects to payapl site after authentication and other verification i get its unique id whatever and then I register to my database.
This gives an ease for enduser and application developer too.
After registering the application on paypal i got
app id:XXXXX
secret key:YYYYY
There are several steps that payal has given.
1. Let the user to login and authenticate by payal and developer get the "code".
2. Use this "code" to get the accesstoken.
3. Finally use this accesstoken to get user info his name and id
that we can use for our user registration.
I have completed the 1st step. i.e. got the "code"
string url = https:
Response.Redirect(url);
but I couldn't pass over the 2nd step and get the error
{"error_description":"client id or secret is null","error":"invalid_client"}
<pre lang="xml">var url = @"https://api.sandbox.paypal.com/v1/identity/openidconnect/tokenservice \-u XXXXXX \-d grant_type=authorization_code&code=" + code + "&redirect_uri=http://localhost:111111/RedirectPage.aspx";
WebClient webClient = new WebClient();
Stream stream = webClient.OpenRead(url);
string b;
using (StreamReader br = new StreamReader(stream))
{
b = br.ReadToEnd();
}
Please guide me in the right way, I am not sure where I am lacking.
Click here for Payapl
Thanks