title: How to post request an authorize code OneDrive
body: <pre><code> Uri url = new Uri("https://login.live.com/oauth20_authorize.srf");
  
          using (var wb = new WebClient())
          {
              var data = new NameValueCollection();
              data["client_id"] = "000000004012B29D";
              data["scope"] = "wl.signin%20wl.basic%20wl.offline_access";
              data["response_type"] = "code";
              data["redirect_uri"] = "https://login.live.com/oauth20_desktop.srf";       
  
              var response = wb.UploadValues(url, "POST", data);
  
  
          }
  </code></pre>
  
  <p>I most likely think my post-request is wrong, but don't know why, only thing I have doubts with is my adding with the scopes, %20 is a simple space, I am not sure whether i can write it like this.
  I should be supposed to receive a resulturl? But all i get is this html code:</p>
  
  <pre><code>"&lt;!-- ServerInfo: BAYIDSLGN3A089 2014.10.28.00.06.35 Live1 ExclusiveNew LocVer:0 --&gt;\r\n&lt;!-- PreprocessInfo: BTSA007:RR1BLDA080,  -- Version: 16,0,25347,0 --&gt;\r\n&lt;html dir=\"ltr\"&gt;\r\n    &lt;head&gt;\r\n        &lt;meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"&gt;\r\n        &lt;base href=\"https://login.live.com/pp1600/\"/&gt;\r\n        \r\n         \r\n             \t\r\n                 \r\n                                            \r\n                                    \t\t\r\n                            &lt;title&gt;Microsoft account&lt;/title&gt;\r\n        &lt;meta name=\"PageID\" content=\"i4400\"&gt;\r\n        &lt;meta name=\"SiteID\" content=\"38936\"&gt;\r\n        &lt;meta name=\"ReqLC\" content=\"1033\"&gt;\r\n        &lt;meta name=\"LocLC\" content=\" \"&gt;\r\n        &lt;link rel=\"stylesheet\" type=\"text/css\" href=\"CSS/WEBblue1033.css?x=16.0.25000.0\"/&gt;\r\n        &lt;script type=\"text/javascript\"&gt;\r\n            function EndPPCRL(rs, u) \r\n            {\r\n                if (external) \r\n                {\r\n                    try \r\n                    {\r\n                        if (rs) \r\n                        {\r\n                            external.RequestStatus = rs;\r\n                            external.WebFlowUrl = u;\r\n                            external.NotifyIdentityChanged();\r\n                            external.ReturnToApp();\r\n                        }\r\n                        else \r\n                        {\r\n                            external._b7(); external.BrowseToAuthUI();\r\n                        }\r\n                    } \r\n                    catch (e) { }\r\n                }\r\n            } \r\n            function BodyLoad() \r\n            { \r\n                EndPPCRL(-2147186656); \r\n            }\r\n        &lt;/script&gt;\r\n        &lt;script type=\"text/javascript\"&gt;\r\n            WizardExternalHelper = function(){ };\r\n            WizardExternalHelper.prototype =\r\n            {\r\n                setProperty: function(key, value) \r\n                { \r\n                    try\r\n                    { \r\n                        window.external.Property(key) = value;\r\n                    }\r\n                    catch (e) { }\r\n                },\r\n                finalNext: function()\r\n                { \r\n                    try\r\n                    { \r\n                        window.external.FinalNext();\r\n                    }\r\n                    catch (e) { }\r\n                }\r\n            };\r\n        &lt;/script&gt;\r\n                &lt;script type=\"text/javascript\"&gt;\r\n            try \r\n            {\r\n                var externalHelper = new WizardExternalHelper();\r\n                externalHelper.setProperty(\"ExtendedErrorString\", \"\");\r\n                externalHelper.setProperty(\"ErrorCode\", parseInt(1));\r\n                externalHelper.setProperty(\"ErrorString\", \"This service isn't available right now—please try again later.\");\r\n                externalHelper.finalNext();\r\n            } catch (e) {};\r\n            function OnBack() {}; \r\n            function OnNext() {};\r\n        &lt;/script&gt;\r\n    &lt;/head&gt;\r\n    &lt;body class=\"modern\" onLoad=\"BodyLoad()\"&gt;\r\n      &lt;div class=\"header\" id=\"idHeaderTD9\"&gt;\r\n        &lt;span&gt;Microsoft account&lt;/span&gt;\r\n      &lt;/div&gt;\r\n      &lt;div class=\"content\"&gt;\r\n         \r\n             \t\r\n                 \r\n                                            &lt;div style=\"padding:15px 0 0 0;font-size:1px;\"&gt;&amp;nbsp;&lt;/div&gt;\r\n                        &lt;h1 class=\"css0046\"&gt;We're unable to complete your request&lt;/h1&gt;\r\n                        &lt;p class=\"css0005\"&gt;Microsoft account is experiencing technical problems. Please try again later.&lt;/p&gt;\r\n                                    \t\t\r\n                          &lt;/div&gt;\r\n    &lt;/body&gt;\r\n&lt;/html&gt;\r\n&lt;!-- _h-Agent: --&gt;\r\n\r\n"
  </code></pre>