title: Unknown authentication scheme on LinkedIn API
body: <p>I'm using OAuth 1.0a for LinkedIn API. Currently, I've already implemented some calls for getting the profile and connections and they all seem to work fine. But for sending a message, the oauth library throws an exception with the following:</p>
  
  <pre><code>{
    "errorCode": 0,
    "message": "Unknown authentication scheme",
    "requestId": "I2Y0MFJ8ME",
    "status": 401,
    "timestamp": 1378376573339
  }
  </code></pre>
  
  <p>I'm using PHP PECL OAuth. I'm initializing the $oauth object like this:</p>
  
  <pre><code>$oauth = new OAuth(API_KEY, API_SECRET, OAUTH_SIG_METHOD_HMACSHA1, OAUTH_AUTH_TYPE_FORM);
  $oauth-&gt;setToken(ACCESS_TOKEN, SECRET);
  </code></pre>
  
  <p>and making the rest call like this:</p>
  
  <pre><code>$url = 'https://api.linkedin.com/v1/people/~/mailbox?format=json';
  $content_type = array('Content-Type' =&gt; 'application/json');
  $oauth-&gt;fetch($url, $message, OAUTH_HTTP_METHOD_POST, $content_type);
  </code></pre>
  
  <p>and $message looks something like this:</p>
  
  <pre><code>$message = Array
  (
      [recipients] =&gt; Array
          (
              [0] =&gt; z2222117O
          )
  
      [subject] =&gt; this is my title
      [body] =&gt; this is my body
      [format] =&gt; json
      [id] =&gt; EAS123123
  )
  </code></pre>
  
  <p>It doesn't look like there's anything wrong with the request. I've followed the instructions from the <a href="http://developer.linkedin.com/documents/messaging-between-connections-api" rel="noreferrer">LinkedIn messaging docs</a>. Anyone else had the same problem? Thanks in advance.</p>