title: Authenticating an API call from Laravel
body: <p>I'm new to using API's and am currently trying to use the Trade Me API on a new application I am developing.</p>
  
  <p>Their <a href="http://developer.trademe.co.nz/api-overview/authorisation/" rel="nofollow">authorisation guidelines</a> say they use OAuth to authenticate the API calls and that these can either be specified in the query string or the authorization header.</p>
  
  <p>Being fairly new to API calls, I tried using the <code>guzzlehttp/oauth-subscriber</code> but failed miserably when trying to make the call. </p>
  
  <p>So currently I am just trying to append the details to the query string.</p>
  
  <p>The call I am trying to make requires:</p>
  
  <ul>
  <li>oauth_consumer_key</li>
  <li>oauth_signature</li>
  <li>oauth_signature_method</li>
  </ul>
  
  <p>Where <code>oauth_consumer_key</code> is the consumer key and <code>oauth_signature</code> is the consumer secret.</p>
  
  <p>When I try to visit this URL to test the URL is correct - <a href="https://api.tmsandbox.co.nz/v1/Listings/123.json?oauth_consumer_key=XXX&amp;oauth_signature=XXX&amp;oauth_signature_method=PLAINTEXT" rel="nofollow">https://api.tmsandbox.co.nz/v1/Listings/123.json?oauth_consumer_key=XXX&amp;oauth_signature=XXX&amp;oauth_signature_method=PLAINTEXT</a></p>
  
  <p>I get an error that:</p>
  
  <blockquote>
    <p>"ErrorDescription":"Invalid PLAINTEXT signature."</p>
  </blockquote>
  
  <p>I've obviously replaced my keys in the above URL but I can't see what is wrong with the above, it seems to match their documentation.</p>
  
  <p>Can someone either point out what I am doing wrong?</p>