Adobe Photoshop Lightroom API


The Lightroom API enables partner applications to access and manage a subscriber's photo catalog. It allows developers to build applications that can access a user's photos, create albums, add photos, and retrieve user information. Unfortunately this API does not have any endpoints that allow for photos to be manipulated with Lightroom. This seems to only be possible through another paid subscription to Adobe Firefly. Regardless, I was interested in exploring this API to see if I could refine the process that I take when importing photos into my library.
My Problem
At the moment I have a bit of a contrived setup for importing photos from my camera. I have a Raspberry Pi permanently setup to listen for the insertion of my camera’s memory card. The Pi automatically copies the images (and any videos) to a timestamped folder on my network attached storage (NAS) under a directory for the current year. I’ve found this to be a convenient and neat way to import and organise stuff. I later rename the timestamped folder to something more appropriate like “Father’s Day.”
Since getting a new camera, I have started using Adobe Lightroom, and it has proven to be worth the investment. My workflow now involves manually creating a corresponding album in Lightroom, importing RAW photos from my NAS, editing them in Lightroom, and then saving both small and large JPEG versions back to my server as an archive.
Why not just store everything in Lightroom? Although it can store videos, the space would be used up very quickly, and upgrading to a higher storage tier would be expensive. My impression is that Lightroom storage is not designed for long-term archiving. It feels more like a scratch space, intended for editing your current work with just enough room to do so comfortably. Once finished, albums should be archived somewhere more permanent. For this reason, I find it necessary to bring the edited photos back onto my NAS. With the images on my NAS, I also gain the ability to conveniently view the photos and videos on our smart TV’s.
As I mentioned, the process can be a bit cumbersome. If I export images from Lightroom and later decide to make further edits, perhaps after learning something new or spotting ways to improve them, I have to export the images again and replace the versions stored on my NAS. Keeping everything in sync is a constant hassle.
The initial import from my NAS into Lightroom can also be quite slow. Each RAW photo taken by my camera is around 44MB, and transferring hundreds of them over WiFi can be a frustrating process.
How the Lightroom API Could Help Me
By using the Lightroom API, my hope would be that I could produce an application that would allow:
My Raspberry Pi to create and fill albums in Lightroom directly when I insert my camera’s memory card.
Synchronisation of the small and large JPEG image versions with my server with changes detected by events.
This would mean no waiting for images to import to Lightroom, and no worry over the local images being in sync with edits I make on Lightroom.
Using the Lightroom API
The first step in using the Lightroom API is to produce an integration to get an API key for the Lightroom API. To do this I followed the steps outlined here:
Logged into the Adobe I/O Console using my usual credentials.
Created a project.
Selected “Add API”
Added the “Lightroom Services API”
Selected “OAuth Single-Page App”
With the API key (Client ID), I could then use Postman to follow the OAuth authentication flow, generate access tokens, setup each endpoint using the API reference, and test if I could use them to:
Upload an image ✅
Access a high-resolution version of an image ✅
Access a low-resolution version of an image ✅
Create an album ❌
Add images to album ✅
I’ve made the workspace I was using public just in case it’s helpful to anyone trying to get to grips with the API. The workspace may be accessed using the button below.
Unfortunately, these tests confirmed that it was not possible to create an album using the Lightroom API in the way that I had wanted. Adobe has implemented this feature in such a way that albums created using the Lightroom API will not show in the Lightroom application. This is confirmed by a community forum post where the Adobe employee replies, “albums are specific to the partner who has created the album. It is only meant to seen on the partner and not on Lightroom applications.“ This is quite frustrating!
I think I would be able to tolerate having to manually create albums in Lightroom, it would still be a big win being able to upload images automatically. Next (and in another blog) I would like to explore events to confirm if it would be possible to trigger some sort of sync when a photo (asset) is edited. Only if this is possible would I pursue this project further.
Subscribe to my newsletter
Read articles from Gregor Soutar directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Gregor Soutar
Gregor Soutar
Software engineer at the UK Astronomy Technology Centre, currently developing instrument control software for MOONS, a next-generation spectrograph for the Very Large Telescope (VLT).