nonce_used error when getting image information

MichelleCoxMichelleCox Registered Users Posts: 2 Beginner grinner
I am using the phpSmug library to connect my club's Drupal website to Smugmug. I have it working for uploading images and for getting the image count of a gallery. I seem to be stuck on viewing an image, though.

When I try to access an image via its key, I get:

Client error: `GET https://api.smugmug.com/api/v2/image/WprRLwK?_verbosity=1` resulted in a `401 Unauthorized` response:
{"Code":401,"Message":"oauth_problem=nonce_used"}

It's a public image so you can put that URL into a browser and see that it exists and retrieves the information just fine without oauth. I have the oauth set up in the integration because the next thing I want to do is edit the image and I need authentication for that part.

I don't know a lot about oauth. From what little I could get out of Google, it sounds like some token is being sent more than once? But the only tokens being sent are the ones that I acquired during the step of hooking my app up to the Smugmug gallery so that can't be changed on each send.

I'm not getting this error when doing $album_container = $this->client->get("/api/v2/album/$key"); so I don't understand why I am getting it with $image_container = $this->client->get("/api/v2/image/$key");

I'd appreciate any suggestions as I'm pretty stuck at this point and would really like to get this deployed. I'm currently having club members use the anonymous uploader page on Smugmug to add their images to the gallery and it's a mess because they can't fix their own mistakes and don't understand setting the title / caption in the image first. I'm hoping having a controlled upload/edit process will help that out but I need to get past this before I can move on to figuring out the "patch" part.

Thanks,

Michelle
Tagged:

Comments

  • MichelleCoxMichelleCox Registered Users Posts: 2 Beginner grinner
    Update:

    The maintainer has found the issue over here: https://github.com/lildude/phpSmug/issues/68
Sign In or Register to comment.