I am trying to get product information through Magento REST API; but results an error starting “ [message:protected] => Invalid auth/bad request (got a 500, expected HTTP/1.
Specifically what did it was adding the accept header to the fetch line:
$oauthClient->fetch($resourceUrl, array(), 'GET', array('Content-Type' => 'application/json', 'Accept' => 'application/json'));