TypeScript client library for the Adobe Photoshop API.
This package is part of the firefly-services-clients monorepo.
npm install @musallam/photoshop-client
import {
PhotoshopClient,
PHOTOSHOP_AXIOS_INSTANCE,
TokenIMSClient,
} from '@musallam/photoshop-client';
// 1. Setup authentication
const imsClient = new TokenIMSClient({
clientId: 'YOUR_CLIENT_ID',
clientSecret: 'YOUR_CLIENT_SECRET',
scopes: ['openid', 'creative_sdk', 'AdobeID'],
});
// 2. Configure axios instance
PHOTOSHOP_AXIOS_INSTANCE.interceptors.request.use(async (config) => {
const token = await imsClient.getAccessToken();
config.headers.Authorization = `Bearer ${token}`;
config.headers['x-api-key'] = 'YOUR_CLIENT_ID';
return config;
});
// 3. Use the client
const jobs = await PhotoshopClient.getJobs({
limit: 10,
});
console.log(jobs);
getJobs() - List jobs for your accountcreateJob() - Submit a new Photoshop jobgetJob() - Retrieve details about a specific jobcancelJob() - Cancel an in-progress jobgetDocument() - Retrieve a Photoshop documentcreateDocument() - Create a new documentupdateDocument() - Update or edit an existing documentFor full API reference and advanced usage, see: https://ahmed-musallam.github.io/firefly-services-clients/photoshop-client/