generate qr code, get history