Skip to main content
taylor_7313
Participant
March 27, 2026
Question

Hit the Lightroom API from Salesforce

  • March 27, 2026
  • 4 replies
  • 39 views

Hi Team,

I am currently trying to hit the Lightroom API from Salesforce to apply tags to images and videos.

I am sending the below payload to attach tags to a particular asset. However, the tags are not getting applied even though the API call is going through.

Please find the method I am using:

public static void applyXmpTags(String assetId, List keywords) {
if (String.isBlank(assetId) || keywords == null || keywords.isEmpty()) return;
String now      = getAdobeTimestamp();
String bodyJson = JSON.serialize(new Map<String,Object>{
'userUpdated' => now,
'xmp'         => new Map<String,Object>{ 'dc' => keywords }
});

}

Payload being sent:
{
"userUpdated": "",
"xmp": {
"dc": ["tag1", "tag2"]
}
}

If anyone has faced a similar issue or has any suggestions on how to get the tags applied successfully, please help me with the solution.

Thanks in advance.

4 replies

jane-e
Community Expert
Community Expert
April 1, 2026

@taylor_7313 

This duplicate thread is locked. Please use this thread:

https://community.adobe.com/questions-680/hit-the-lightroom-api-from-salesforce-1555360?postid=1555360#post1555360

 

Jane

 

 

jane-e
Community Expert
Community Expert
April 1, 2026

@taylor_7313 

 

Lightroom has its own forum, separate from the Photoshop forum.

Please post here:

https://community.adobe.com/lightroom-ecosystem-cloud-based-677

 

Jane

jane-e
Community Expert
Community Expert
April 1, 2026

@taylor_7313 

Update: this is a triplicate message. I see that you have already posted twice to the LR forum. Please reply in your first post and refrain from creating new posts on the same topic.

 

 

 

This thread is now locked.

 

Jane

 

taylor_7313
Participant
April 1, 2026

Hello Team,

I hope you are doing well.

I am currently working on integrating the Lightroom Services API for our application. At the moment, I am able to successfully authenticate and access APIs using the available scopes such as:

  • openid
  • AdobeID
  • lr_partner_apis
  • lr_partner_rendition_apis
  • offline_access

However, when attempting to perform operations like updating asset metadata (e.g., applying XMP tags using PATCH requests), I am receiving a 403 Forbidden response.

Upon investigation, I understand that this issue is due to missing write permissions, specifically the "lr:catalogs" scope, which is currently not available in my project configuration.

I would like to request access to the following scopes:

  • lr:catalogs:write
  • lr:catalogs

Use Case:

We need to update metadata (XMP tags/keywords) on Lightroom assets programmatically using the API. This is a critical requirement for our integration.

Could you please guide us on how to enable these scopes or approve our application for the required permissions?

Please let me know if any additional information is needed from our end.

taylor_7313
Participant
March 31, 2026

Hi Team,

I am currently integrating Salesforce with the Lightroom API to upload assets (images and videos) and apply XMP tags.

The asset upload process is working successfully. However, I am facing an issue while applying tags to the uploaded assets using the XMP metadata API.

I am using the following API endpoint:
PUT /assets/{assetId}

Below is the payload I am sending:

{
"userUpdated": "",
"xmp": {
"dc": ["tag1", "tag2"]
}
}

Issue Details:

  • The API call is executing without any errors (receiving HTTP 200/201/204).
  • However, the tags are not getting applied to the assets in Lightroom.
  • This issue is occurring for both images and videos.

Code Snippet (Salesforce Apex):

public static void applyXmpTags(String assetId, List keywords) {
if (String.isBlank(assetId) || keywords == null || keywords.isEmpty()) return;

String now = getAdobeTimestamp();
String bodyJson = JSON.serialize(new Map<String,Object>{
'userUpdated' => now,
'xmp' => new Map<String,Object>{ 'dc:subject' => keywords }
});

HttpRequest req = new HttpRequest();
req.setEndpoint(BASE_URL + CATALOG_ID + '/assets/' + assetId);
req.setMethod('PUT');
req.setHeader('Content-Type', 'application/json');
req.setHeader('x-api-key', CLIENT_ID);
req.setHeader('x-gw-ims-org-id', ORG_ID);
req.setHeader('If-Match', '*');
req.setBody(bodyJson);

HttpResponse res = new Http().send(req);
System.debug('Response: ' + res.getStatusCode() + ' - ' + res.getBody());

}

Request:
Could you please help in identifying:

  • Whether the payload format for applying XMP tags is correct?
  • If any additional headers or permissions are required?
  • Whether tagging is supported for both images and videos via this API?

Please let me know if any additional details (logs, request/response samples) are required.