Edit in GitHubLog an issue

Monetization Flows

Get Current User information

You can leverage the currentUser API to obtain the information for the currently logged-in user, for instance, if you want to use their userId to validate in a monetization flow.

See the example below and refer to the related SDK Reference section and the licensed-addon code sample, which shows how you can utilize the hash of the user ID to integrate your add-on with licensing and payment services.

Copied to your clipboard
import addOnUISdk from "https://new.express.adobe.com/static/add-on-sdk/sdk.js";
addOnUISdk.ready.then(async () => {
validateUser(await addOnUISdk.app.currentUser.userId());
});
validateUser(userId: string) {
...
}
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.