Insufficient permissions when calling flickr.auth.oauth.checkToken

Posted by Designer 17 on Programmers See other posts from Programmers or by Designer 17
Published on 2013-10-30T17:29:13Z Indexed on 2013/10/30 22:16 UTC
Read the original article Hit count: 637

Filed under:
|
|

This is a follow up on another question I had asked on stackoverflow a day or so ago.

I'm working on trying to call flickr.people.getPhotos... but no matter what I do I keep getting this... jsonFlickrApi({"stat":"fail", "code":99, "message":"Insufficient permissions. Method requires read privileges; none granted."}); but if you were to look at my "Apps You're Using" page (on flickr) you'd see this.

Screenshot of my authorized permissions

So, even though I've authorized the max permissions... flickr says I don't have any granted!?

I even used flickr.auth.oauth.checkToken to double check that my access token was right, this was the value returned; jsonFlickrApi({"oauth":{"token":{"_content":"my-access-token"}, "perms":{"_content":"delete"}, "user":{"nsid":"my-user-nsid", "username":"designerseventeen", "fullname":"Designer Seventeen"}}, "stat":"ok"})

Here's how I'm attempting to call flickr.people.getPhotos...

<?php
// Attempt to call flickr.people.getPhotos
$method = "flickr.people.getPhotos";
$format = 'json';
$nsid = 'my-user-nsid';
$sig_string = "{$api_secret}api_key{$api_key}format{$format}method{$method}user_id{$nsid}";
$api_sig = md5( $sig_string );

$flickr_call = "http://api.flickr.com/services/rest/?";

$url  = "method=" . $method;
$url .= "&api_key=" . $api_key;
$url .= "&user_id=" . $nsid;
$url .= "&format=" . $format;
$url .= "&api_sig=" . $api_sig;

$url = $flickr_call . $url;
$results = file_get_contents( $url );

$rsp_arr = explode( '&',$results ); 
print "<pre>";
print_r($rsp_arr);
print "</pre>";

I am officially stumped... and in need of help. Thanks!

© Programmers or respective owner

Related posts about php

Related posts about oauth