The Add Frame feature is not yet available in Base App but is coming soon. This documentation describes the upcoming API that will be available when the feature is fully deployed.
Enables users to save your Mini App to their personal collection for quick access. Returns notification credentials when successful, enabling future push notifications to re-engage the user.
const handleAddFrame = async () => { try { const result = await addFrame(); if (result === null) { // User cancelled or already saved console.log('No action taken'); } else { // Successfully saved console.log('Saved with token:', result.token); } } catch (error) { // Network error or other issue console.error('Save failed:', error); showErrorMessage('Failed to save. Please try again.'); }};
The notification token is unique per user and Mini App combination. Store it securely in your database and never expose it in client-side code. Tokens are required for sending push notifications when that feature becomes available.
Users can only save each Mini App once. Subsequent calls to addFrame() for the same user and app will return null. Use context.client.added from useMiniKit to check if the user has already saved your app.