Alby Developer Guide
Alby Browser Extension APIs
Ask or search…
⌃K
Links

enable

To begin interacting with Alby APIs you'll first need to enable the provider. Calling alby.enable() will prompt the user for permission to use the Alby capabilities of the browser. After that, you are free to call any of the other API methods.

Method

async function enable(): void;
Example
try {
if(typeof window.alby !== 'undefined') {
await window.alby.enable();
}
}
catch(error) {
// User denied permission or cancelled
console.log(error);
}
Last modified 4mo ago