UI/iFrame integrations
Build custom UI integrations with iFrames that interact with Missive using JavaScript API.
Last updated
// When user needs to authenticate
const token = await Missive.storeGet('auth_token')
if (!token) {
// Show login form
// After successful login:
await Missive.storeSet('auth_token', 'user_token_12345')
} else {
// Validate token and show content
}async function authenticateWithOAuth() {
try {
// 1. Initiate OAuth flow
const response = await Missive.initiateCallback('https://your-auth-endpoint')
// 2. Response will contain query params from the OAuth redirect
const { access_token } = response
// 3. Store the token for future use
await Missive.storeSet('oauth_token', access_token)
} catch (error) {
console.error('OAuth flow failed:', error)
}
}