Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


Ian Svoboda
Ian Svoboda
16,639 Points

How can I use the OneDrive API to display photos on my webpage?


I'm trying to get all the photos from a specific, public OneDrive album and display them to my webpage using the OneDrive API. The purpose here is to use the images in this album to populate a gallery on one of the site's pages.


I've done some reading on the developer page and it certainly seems possible. I'm getting stuck on access tokens however.

From what I can gather, it looks like i'd need to authenticate to retrieve this type of data (i.e. sign in, provide access token, then get the data). I would ideally like to bypass this since the album folder isn't private but I'm lost on where to start.

I don't want someone to do this for me of course, I'm just looking for some "experienced direction".

About me

I have very little experience with APIs but I am familiar with HTML, CSS, PHP, and Javascript/jQuery.

I'll be happy to answer any additional questions needed.

Dave McFarland
Dave McFarland
Treehouse Teacher

Hi Ian Svoboda

Can you post a link (or links) to the developer pages for OneDrive?

Ian Svoboda
Ian Svoboda
16,639 Points

My bad I should've included that originally! http://msdn.microsoft.com/en-us/library/dn631839.aspx

I was looking under Scopes and Permissions (http://msdn.microsoft.com/en-us/library/dn631845.aspx) and I believe I found the methods/objects I can use, such as "Photo" (http://msdn.microsoft.com/en-us/library/hh243648.aspx#photo) but I'm still kind of stuck.

Really appreciate the help here!