Forum Discussion
Anonymous
3 years agoNot applicable
Testing License API
Hi How can I test license API before publishing the bundle to AppSource? I have React to build my own visul and use license API for payments. I found examples here: https://learn.microsoft.com/...
Anonymous
3 years agoNot applicable
My code:
constructor(options: VisualConstructorOptions) {
this.host = options.host
this.licenseManager = options.host.licenseManager
this.licenseManager.getAvailableServicePlans().then((result) => {
this.isPowerBILicense = !!(
result.plans &&
result.plans.length &&
result.plans.some(
(plan) =>
PAID_PLANS.includes(plan.spIdentifier) &&
(plan.state === powerbi.ServicePlanState.Active ||
plan.state === powerbi.ServicePlanState.Warning),
)
)
})
}Now, I am in developer mode and I can't get real data, because the visual is not published.
How can I test the license?