acs-sdk
v4.4.0
Published
Unofficial Adobe Campaign Standard API SDK
Downloads
22
Maintainers
Readme
Unofficial Adobe Campaign Standard (ACS) API SDK
Adobe Campaing Standard API Docs: https://docs.adobe.com/content/help/en/campaign-standard/using/working-with-apis/about-campaign-standard-apis/about-campaign-standard-apis.html
Example:
const { ACSHttpClient, JWTAuthorizer } = require("acs-sdk");
// authentication information https://www.adobe.io/authentication/auth-methods.html#!AdobeDocs/adobeio-auth/master/AuthenticationOverview/ServiceAccountIntegration.md
const authorizer = new JWTAuthorizer({
adobeOrgId: "EF2D363--------CA@AdobeOrg",
clientId: "bb11ebd6406a4f---------f705b26a",
clientSecret: "[email protected]",
metascopes: ["ent_campaign_sdk"],
privateKey: "-----BEGIN RSA PRIVATE KEY-----\n...",
technicalAccountId: "[email protected]"
});
// Organizational info: https://docs.adobe.com/content/help/en/campaign-standard/using/working-with-apis/about-campaign-standard-apis/setting-up-api-access.html
const client = new ACSHttpClient({ orgId: "acme", orgInstanceId: "acme-mkt-stage1" }, authorizer);
Supported operations:
NOTE: In order to have the profiles api you must check the Add access authorization management fields in the Profile extension, more details here
sendTransactionalEvent Docs: https://docs.adobe.com/content/help/en/campaign-standard/using/working-with-apis/managing-transactional-messages.html
client.sendTransactionalEvent("EVTTest", "[email protected]", { customData: "customValue" });
getTransactionalEvent Docs: https://docs.adobe.com/content/help/en/campaign-standard/using/working-with-apis/managing-transactional-messages.html#response-to-the-post-request
client.getTransactionalEvent("EVTTest", "adobe-event-pkey");
sendTransactionalPushEvent Docs: https://docs.adobe.com/content/help/en/campaign-standard/using/communication-channels/transactional-messaging/transactional-push-notifications.html
client.sendTransactionalPushEvent( "EVTPushTest", { customData: "customValue" }, { pushPlatform: "apns", application: "applicationName", registrationToken: "token", } );
insertProfile Docs: https://docs.adobe.com/content/help/en/campaign-standard/using/working-with-apis/managing-profiles/creating-profiles.html
client.insertProfile({ email: "[email protected]", customData: "customValue" });
getProfilesByEmail Docs: https://docs.adobe.com/content/help/en/campaign-standard/using/working-with-apis/global-concepts/additional-operations/filtering.html
client.getProfilesByEmail("[email protected]");
updateProfile Docs: https://docs.adobe.com/content/help/en/campaign-standard/using/working-with-apis/managing-profiles/updating-profiles.html
client.updateProfile(profile.PKey, { firstName: "Hello", lastName: "World" });
Contributors ✨
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!