TheFox / flickr-cli

A command-line interface to Flickr. Upload and download photos, photo sets, directories via shell.
https://fox21.at
26 stars 9 forks source link

Permissions Error not displaying during upload #42

Open tacman opened 6 years ago

tacman commented 6 years ago

I've followed the instructions for creating an API Key on Flickr, but when I attempt to upload, I'm getting a persissions error:

                $xml = $apiFactoryVerbose->upload($filePath, $fileName, $description, $tags);
'code' =>
      string(2) "99"
      'msg' =>
      string(73) "Insufficient permissions. Method requires write privileges; read granted."

I've added a PR to at least display an error when this situation happens, but am completely stuck on why I'm getting this error.

tacman commented 6 years ago

FWIW, perhaps it's related to the oAuth signature, per this discussion:

https://www.flickr.com/groups/51035612836@N01/discuss/72157666169163671/

But it looks like the addOAuthParameters() method does this. Happy to share my API key with the developer to help solve this

tacman commented 6 years ago

I had chosen 'read' instead of 'write' when initially setting up the token. I'd prefer that the choices say "Read Only", "Read/Write", "Read/Write/Delete", to make it clearer.

Still, when upload fails it should print a message, which I've added as a Pull Request.

TheFox commented 6 years ago

I will change this in the description.