title: "Error:" "Unsupported_grant_type" Using OAuth 2.0, Owin. Password Grant and Authorization Grant
body: <p>I'm building a Web API Application using <strong>Framework</strong> NOT Core. I have a user Authorization which is Login/Logout/Register User <strong>Password Grant_Type</strong>, using <strong>Owin</strong> and <strong>OAuth2</strong> <strong>Password Grant_Type</strong>.</p>
  <p>To Access the NopCommerce protected resource I have to authorize my application using OAuth2, Authorization Grant_Type obtaining a token. [enter link description here][1]</p>
  <p>The Problem is when I call the <strong>/Token</strong> endpoint using <strong>Authorization Grant</strong>. The moment NopCommerce API Redirects the user to callback url, I see the <strong>&quot;Error:&quot; &quot;Unsopported_grant_type&quot;</strong> message.</p>
  <p><strong>Startup.Auth.cs</strong></p>
  <pre><code>// Configure the application for OAuth based flow
              PublicClientId = &quot;self&quot;;
              OAuthOptions = new OAuthAuthorizationServerOptions
              {
                  TokenEndpointPath = new PathString(&quot;/Token&quot;),
                  Provider = new ApplicationOAuthProvider(PublicClientId),
                  AuthorizeEndpointPath = new PathString(&quot;/api/Account/ExternalLogin&quot;),
                  AccessTokenExpireTimeSpan = TimeSpan.FromDays(14),
                  ApplicationCanDisplayErrors = true,
                  // In production mode set AllowInsecureHttp = false
                  AllowInsecureHttp = true
              };
  </code></pre>
  <p>And The Standard <strong>ApplicationOauthProvider.cs</strong> that comes with <strong>Owin</strong>.</p>
  <p>How can i use the above /Token endpoint using OAuth2 <strong>Authorization Grant_Type</strong>?</p>