I'm getting a permissions error (see bottom of post) when using REST, but not when using the seemingly same YQL query. In this code sample, the uncommented line fails with the response at the bottom of this message, while the commented line returns results. What am I missing?
CODE
$y = YahooSession::requireSession($this->consumerKey, $this->consumerSecret);
$response = $y->client->post("http://fantasysports.yahooapis.com/fantasy/v2/player/nfl.p.5479/metadata");
//$response = $y->query("select * from fantasysports.players where player_key='nfl.p.5479'");
Error Response:
CODE
Array
(
[method] => POST
[url] => http://fantasysports.yahooapis.com/fantasy/v2/player/nfl.p.5479/metadata
[code] => 401
[requestHeaders] => Array
(
[0] => Accept: application/json
[1] => Authorization: OAuth {removed for security}
)
[requestBody] =>
[responseHeaders] => Array
(
[Date] => Thu, 17 Jun 2010 07:29:14 GMT
[P3P] => policyref="http://info.yahoo.com/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC GOV"
[cache-control] => public,max-age=60,stale-while-revalidate=30
[content-length] => 375
[content-type] => application/xml; charset=utf-8
[Vary] => Accept-Encoding
[Connection] => close
)
[responseBody] =>
You do not have the appropriate OAuth scope permissions to perform this action.
)