title: Exception using DropNet
body: <p>So I'm new to using external API's for projects, but I had an idea and I'd like to see if I can properly get files uploaded to dropbox. I've gone through the steps to get the key and token, and I've begun testing but I have run into an error:</p>
  
  <blockquote>
    <p>An unhandled exception of type 'System.ArgumentNullException' occurred in DropNet.dll
    Additional information: Value cannot be null.</p>
  </blockquote>
  
  <p><strong>Update:</strong> Looking into the error further the actual parameter that is null would be "userLogin"**</p>
  
  <p>This is my code before the error:
      //using Dropnet;</p>
  
  <pre><code>DropNetClient _client = new DropNetClient("API_KEY", "API_SECRET", DropNetClient.AuthenticationMethod.OAuth1);
  </code></pre>
  
  <p>The code that produces the error:</p>
  
  <pre><code>var url = _client.BuildAuthorizeUrl();
  </code></pre>
  
  <p>And my code following the error:</p>
  
  <pre><code>Process.Start(url);
  _client.GetAccessTokenAsync((accessToken) =&gt;
      {
          _client = new DropNetClient("API_KEY", "API_SECRET", accessToken.Token, accessToken.Secret);
      },
      (error) =&gt;
      {
          MessageBox.Show(error.Message);
      });
  try
  {
      _client.UploadFile("/", "test.txt", ReadFile(@"D:\Classes\Documents\test.txt"));
  
      MessageBox.Show("Successfully uploaded to Dropbox.", "Uploaded to Dropbox");
  }
  catch (Exception dropboxEx)
  {
      MessageBox.Show("Error: " + dropboxEx.Message);
  }
  </code></pre>
  
  <p>I am fairly sure the error has something to do with the deceleration of the client,  perhaps I'm misusing the key and secret? Or my OAuth uri could possibly be incorrect, I'm not really sure but in case it matters here is what my dropbox developer page looks like:</p>
  
  <p><img src="https://i.stack.imgur.com/ljeNX.png" alt="My Dropbox Page">
  If you need any more information please let me know, thanks for any help!</p>