<script src="https://cdn.plaid.com/link/v2/stable/link-initialize.js"></script>
const handler_{uid} = Plaid.create({
token: '{GENERATED_LINK_TOKEN}',
onSuccess: (public_token, metadata) => {
const xhr = new XMLHttpRequest();
xhr.open("POST", "{CALLBACK_URL}", true);
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.send(JSON.stringify({
public_token: public_token
iframe = iframe.replace('{uid}', uid)
iframe = iframe.replace('{CALLBACK_URL}', cb_url.get('url'))
iframe = iframe.replace('{GENERATED_LINK_TOKEN}', token.get('link_token'))
IPython.core.display.display(IPython.core.display.HTML(iframe))