Local and cloud-based workflows for extracting and updating text layers in PSD files via ExtendScript and Adobe PS API. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
7.5 KiB
Adobe Photoshop API Status Update
Latest Information from Adobe (April 22, 2025)
Adobe has provided the following clarifications regarding API access and endpoints:
Authentication
To generate an access token:
-
Send a POST request to
https://ims-na1.adobelogin.com/ims/token/v3with these parameters:client_id: The client_id value provided by Adobeclient_secret: The client_secret value provided by Adobegrant_type: Set toclient_credentialsscope: Varies by service- For Photoshop API:
openid,AdobeID,read_organizations - For Firefly API:
openid,AdobeID,firefly_api,ff_apis
- For Photoshop API:
-
Response includes:
access_token: Token for API requeststoken_type: Will be "bearer"expires_in: ~86399 (24 hours)
Note: Tokens expire after 24 hours; a new token must be generated after expiration.
API Endpoints
Corrected Information
-
Photoshop REST API:
- Uses the subdomain
image.adobe.ioexclusively - Action JSON endpoint:
https://image.adobe.io/pie/psdService/actionJSON - Product Crop endpoint:
https://image.adobe.io/pie/psdService/productCrop
- Uses the subdomain
-
Not Used for Photoshop REST API:
photoshop.adobe.iophotoshop-services.adobe.io
File Storage
- Adobe does NOT provide endpoints to generate pre-signed URLs
- Instead, use external storage solutions like Amazon S3, Azure Storage, or Google Cloud Storage
- These services support creating pre-signed URLs for use with Adobe APIs
Implementation Changes Required
Based on Adobe's clarification, we need to make these changes:
-
Update API Endpoints:
- Replace
https://firefly-api.adobe.io/v2/photoshop/editTextwithhttps://image.adobe.io/pie/psdService/actionJSON - Remove attempts to use the presigned URL endpoints at Adobe
- Replace
-
Storage Approach:
- Continue using Google Cloud Storage for file storage
- Generate signed URLs for both input and output files using GCS
- Use these URLs in API requests to Adobe
-
Authentication:
- Use the correct scope for each API:
- Photoshop API:
openid,AdobeID,read_organizations - Firefly API:
openid,AdobeID,firefly_api,ff_apis
- Photoshop API:
- Use the correct scope for each API:
These changes have been implemented in the latest code updates.
Current Status
- ✅ Fixed token generation with correct scopes
- ✅ Updated to use the correct API endpoints
- ✅ Configured external storage (GCS) for file handling and signed URLs
- ✅ Successfully implemented asyncronous processing with the Adobe API
- ✅ Full workflow technically working from upload to downloading processed files
- ❌ Text layer updates not applied by the API despite successful responses (202)
Key Findings from Testing
- Authentication: Using the correct client secret, we were able to successfully authenticate with Adobe's API
- API Endpoints: The
/textendpoint is the correct one to use, notactionJSON - Layer IDs: The API requires integer IDs for layers, strings are not accepted
- Async Processing: The API returns a 202 Accepted status, processes asynchronously, and then puts the result in the output URL
- External Storage: Using Google Cloud Storage with signed URLs works correctly
- Layer Update Issue: Despite all other aspects working correctly, the API does not actually update the text layers in the output file regardless of what layer identification method is used
Comprehensive Text Layer Update Issue Investigation
After extensive testing with the Adobe Photoshop API, we've determined:
-
API Response Pattern:
- The API consistently returns 202 Accepted for text update requests
- Status URL shows "succeeded" processing
- Output files are generated successfully
- BUT the text layers in the output files remain unchanged
-
Attempted Solutions:
- Tried various layer identification methods (ID, name, path)
- Tested different numeric ID values
- Used combinations of identifiers
- Verified all aspects of the API call (auth, URLs, format)
- All attempts received successful API responses but no actual text changes
A detailed report of our testing and potential solutions has been documented in API-LAYER-ID-SOLUTION.md, recommending the use of our local scripting approach instead of the API until this issue can be resolved.
Recommended Next Steps
-
Continue Using Local Script Workflow:
- Use the working
mac_ps_extract.pyandmac_ps_update.pyscripts - These directly interact with Photoshop through ExtendScript
- Reliably update text layers with proper formatting
- Use the working
-
Contact Adobe Developer Support:
- Request clarification on text layer updates via API
- Share our test results showing the issue
- Ask for sample code or documentation
-
Documentation and Training:
- Document the existing local workflow thoroughly
- Train team members on the ExtendScript-based approach
- Maintain API code for future updates from Adobe
Future API Development (When Fixed)
If Adobe resolves the API issues in the future:
- Update our layer ID extraction script
- Modify JSON generation to include proper IDs
- Update API integration accordingly
- Implement hybrid approach for flexibility
Reference Documentation
Previous Status (April 17, 2025)
Authentication: ✅ WORKING
- The new access token (created April 17, 2025) successfully authenticates
- Adobe IMS user info endpoint returns 200 OK response
- Authentication to IMS services is now fully functional
Service Endpoints and Storage: ✅ CONFIGURED
We have fully implemented the correct Adobe API workflow with external storage:
-
Text Editing API: ✅ FORMAT CONFIRMED & INTEGRATED
https://image.adobe.io/pie/psdService/text: API endpoint now correctly configured- Proper payload format implemented using:
- Layer ID as integer
- Text as an object with content field
- Input/output references as valid signed URLs from Google Cloud Storage
- Storage type set to "external" (as per documentation)
-
Storage Integration: ✅ GCS IMPLEMENTED
- Complete Google Cloud Storage integration added
- Using bucket
lor-txt-tmp-bktfor temporary file storage - Functionality includes:
- File upload to GCS
- Signed URL generation for both read and write operations
- Output file retrieval and download
- Full workflow automation
-
DNS Resolution Issues:
- Some Adobe domains still can't be resolved:
photoshop.adobe.iocc-api.adobe.io
- Some Adobe domains still can't be resolved:
Token Analysis
The JWT token has been decoded and analyzed, revealing:
{
"id": "1744876343937_515b5458-d574-47de-8f78-b490c0b6b9f2_ue1",
"org": "FAD61E276686DB3D0A495EC4@AdobeOrg",
"type": "access_token",
"client_id": "f34becb759244899bd73b86220f6fb92",
"user_id": "DA371F5767EBD07D0A495F94@techacct.adobe.com",
"as": "ims-na1",
"aa_id": "DA371F5767EBD07D0A495F94@techacct.adobe.com",
"ctp": 3,
"moi": "30055fe7",
"expires_in": "86400000",
"created_at": "1744876343937",
"scope": "openid,AdobeID,read_organizations"
}
Key findings:
- Token created: April 17, 2025
- Expiration: Set for 1000 days from creation (January 12, 2028)
- Scopes:
openid,AdobeID,read_organizations - Technical account:
DA371F5767EBD07D0A495F94@techacct.adobe.com