DEV Community

Ravi Kant Singh
Ravi Kant Singh

Posted on

Unable to get Access token and Refersh token using C#

All ClientID, ClientSecret & RedirectURI placed in the web.config.

<appSettings>      
    <add key="redirectURI" value="http://localhost:55593/oauthplayground" />
    <add key="clientId" value="uX4YpHHNm****ltekoG" />
    <add key="clientSecret" value="K5cSv3izT1GZ9PXnaWWfRWbTv10*****O3JkYFMlWMF3FhBtjyk0FqJduGJZSAL7B1DngJyxgX3KKNSD0Bqdv" />    
</appSettings>

Now from here I got the authentication code.

static string redirectURI = ConfigurationManager.AppSettings["redirectURI"];
static string clientID = ConfigurationManager.AppSettings["clientID"];
static string clientSecret = ConfigurationManager.AppSettings["clientSecret"];

protected void btnclick_Click(object

Top comments (0)