Edit in GitHubLog an issue

addOnUISdk.app.currentUser

Provides access to the currently logged in user.

Methods

userId()

Retrieve the current user of the host application (Adobe Express).

Signature

userId(): Promise<string>

Return Value

A resolved Promise containing the userId of the current user.

Example

Copied to your clipboard
import addOnUISdk from "https://new.express.adobe.com/static/add-on-sdk/sdk.js";
addOnUISdk.ready.then(async () => {
const userId = await addOnUISdk.app.currentUser.userId();
console.log("Current Userid: " + userId);
});

isPremiumUser()

Indicates if the current user is a premium user.

Signature

isPremiumUser(): Promise<boolean>

Return Value

A resolved Promise containing a boolean value indicating if the user is a premium user or not.

Example

Usage

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