TypeScript client library for Adobe IMS (Identity Management Services) authentication and token management.
This package is part of the firefly-services-clients monorepo.
npm install @musallam/ims-client
import { TokenIMSClient } from '@musallam/ims-client';
// 1. Instantiate the IMS client
const imsClient = new TokenIMSClient({
clientId: 'YOUR_CLIENT_ID',
clientSecret: 'YOUR_CLIENT_SECRET',
scopes: ['openid', 'creative_sdk', 'AdobeID'],
});
// 2. Acquire an access token
const accessToken = await imsClient.getAccessToken();
console.log('IMS Token:', accessToken);
// Tokens are cached and automatically refreshed before expiry
TokenIMSClientconstructor(options)
clientId (string)clientSecret (string)scopes (string[])getAccessToken(): Promise<string>
import {
StorageAndCollaborationClient,
STORAGE_AXIOS_INSTANCE,
} from '@musallam/storage-and-collaboration-client';
import { TokenIMSClient } from '@musallam/ims-client';
const imsClient = new TokenIMSClient({
clientId: 'YOUR_CLIENT_ID',
clientSecret: 'YOUR_CLIENT_SECRET',
scopes: ['openid', 'creative_sdk', 'AdobeID'],
});
STORAGE_AXIOS_INSTANCE.interceptors.request.use(async (config) => {
const token = await imsClient.getAccessToken();
config.headers.Authorization = `Bearer ${token}`;
return config;
});
For full API documentation, see: https://ahmed-musallam.github.io/firefly-services-clients/ims-client/