I am attempting to connect with my University's OAuth system. Regrettably it returns a 401 error:

This request requires HTTP authentication ().

I've changed the particular values for that secrets etc below for hopefully apparent security reasons!

try {
    $oauth = new OAuth('key','secret',OAUTH_SIG_METHOD_HMACSHA1,OAUTH_AUTH_TYPE_URI);
    $oauth->enableDebug();
    echo 'test ~';  
    $oauth->setToken('token','token-secret');
    echo 'test ~';
    $oauth->fetch("https://www.urlhere.ac.uk/page.json?page=".$target."%2Fresources", null, OAUTH_HTTP_METHOD_GET, array('Connection'=>'close'));
    echo 'test'.$oauth->debugInfo.'test';
    echo 'test ~'.$oauth->getLastResponse();
    echo '</pre><hr/>';
} catch(OAuthException $E) {
echo "Exception caught!\n";
echo "Response: ". $E->lastResponse . "\n";
}

I'm able to make sure I certainly possess the permissions to see this site with my account and for that reason all of the secrets, secrets etc are permitted along with the right permissions (as proven within the Authorised Tokens part of the University's intranet).

Any help here could be greatly appreciated!

The problem switched to be that people were not able to to possess several scope previously, though this was a problem using the University's setup, instead of on our finish. Doubt this helps other people however when debugging try asking for an expression with only one scope, instead of multiple scopes.