Search...
getDecodedAppInstance( )
Gets the Wix Blocks App data as a decoded Json Web Token (JWT) object.
Description
The getDecodedAppInstance()
function returns a Promise that resolves to an object with data about the installation of your app on a specific site.
It is useful when managing your application's pricing.
Syntax
function getDecodedAppInstance(): Promise<decodedAppInstance>
getDecodedAppInstance Parameters
This function does not take any parameters.
Returns
Fulfilled - An object with data about the installation of your app on a specific site.
Return Type:
Promise<decodedAppInstance>
NAME
TYPE
DESCRIPTION
appDefId
string
The unique idenfitier of your app.
instanceId
string
The ID of your app on this specific site.
vendorProductId
string
The Plan ID of the app purchased by the site.
Was this helpful?
Retrieve the Vendor Product ID
Copy Code
1import wixApplication from 'wix-application';23// ...45const instance = await wixApplication.getDecodedAppInstance();6const plan = instance.vendorProductId; // 'basic'