Access Images from Password Protected Albums using API V2
abhishekit1986
Registered Users Posts: 1 Beginner grinner
Hi Guys,
I am using the API V2 version to fetch the albums and their respective images to show the website, however, I am facing a problem. I have protected the albums/folders with the password. Now I am not sure what parameter suppose to be passed in the API so I can get details of all the images in the Album.
To fetch the image I am using this method. /api/v2/album/{AlbumHash}!images
Your instant help will be highly appreciated.
Thanks for your help in advance.
Abhishek Singh
I am using the API V2 version to fetch the albums and their respective images to show the website, however, I am facing a problem. I have protected the albums/folders with the password. Now I am not sure what parameter suppose to be passed in the API so I can get details of all the images in the Album.
To fetch the image I am using this method. /api/v2/album/{AlbumHash}!images
Your instant help will be highly appreciated.
Thanks for your help in advance.
Abhishek Singh
Tagged:
0
Comments
Hi Abhishek,
To access password protected resources you have 2 options.
1) authenticate as the owner using OAuth.
2) unlock the node using the UnlockNode endpoint
Option 1 is more robust, but a little more difficult to get up and running. The documentation here details our OAuth endpoints https://api.smugmug.com/api/v2/doc/tutorial/authorization.html and provides resources for finding out more about OAuth if you're not familiar
Option 2 requires you the Node associated with the resource (album or folder) and then POSTing to /api/v2/node/{NodeID}!unlock endpoint with the node password. The UnlockNode endpoint response will set a cookie that you'll need to pass along with any subsequent requests to the protected resource.
Let us know if you have any further questions.
Cheers,
Lee
SmugMug API Sorcerer