React and browser client SDK
The browser SDK has no Vine API key and must only talk to endpoints you expose from your backend.
bash
npm install @vineeid/clienttsx
import { VineClient } from '@vineeid/client'
import { useEffect, useState } from 'react'
const vine = new VineClient()
export function VineQr({ code }: { code: string }) {
const [src, setSrc] = useState('')
useEffect(() => {
void vine.qr.toDataURL(code, { size: 240 }).then(setSrc)
}, [code])
return src ? <img src={src} alt="Scan with Vine app" /> : null
}Use vine.poller.poll() with your own status URL. Never send VINE_API_KEY or flow_secret to a browser.