function main() {
    let sessionId = args[0]
    let worker = request.new()

    let req = {
        "method": "POST",
        "url": "https://auth.cloud.alipay.com/webapi/auth/createqrCode",
        "headers": {
            "referrer": "https://usercenterweb.antdigital.com/",
            "user-agent": "Mozilla/5.0 (X11; CrOS x86_64 8.8.260206) AppleWebKit"
        },
    }

    let res = worker.parse(req)
    if (res.status_code != 200) {
        sse.send(sessionId, 'panic', '获取登录授权链接失败')
        return ''
    }

    let data = res.body.toObject()
    let loginUrl = runtime.call('api/utils/sortUrl/function.js', data.result.qrCodeUrl).short_url.short_url

    sse.send(sessionId, 'data', `{"code":"${data.result.qrCodeToken}", "url":"${loginUrl}"}`)

    return {
        code: data.result.qrCodeToken,
        url: loginUrl
    }
}