I\'m following this interactive login example from Paypal\'s site.
public ActionResult PaypalResponse(string scope, string code)
{
Dictionary&l
Sailen's answer above worked for me. However, because Paypal changed their encryption to TLS in June 2016, the solution as it was written will return the following error
The request was aborted: Could not create SSL/TLS secure channel.
Based on answers provided in another thread, the SecurityProtocol needs to be set to Tls12 before creating the WebRequest. Hope this helps someone.
Here's a snippet.
var postBody = $"grant_type=authorization_code&code={code}";
System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;
var authRequest = (HttpWebRequest)WebRequest.Create(oAuthUrl);