integrate redirect url to demo code
handle postMessage