Google API OAuth2.0 quickstart.py

时间:2017-06-01 16:40:59

标签: linux python-2.7 ubuntu google-api google-api-python-client

当我使用Google API中提供的Quickstart.py代码示例时,我收到此错误。有关为何产生此错误的任何想法? 链接:https://developers.google.com/google-apps/calendar/quickstart/python (我已经更新了oauth2cilent模块)

    let seg = YSSegmentedControl(
        frame: CGRect(
            x: 0,
            y: 0,
            width: 0,
            height: 0),
        titles: [
            "First",
            "Second",
            "Third"
        ],
        action: {
            control, index in
            print ("segmented did pressed \(index)")
        })

    seg.delegate = self
    view.addSubview(seg)
}

1 个答案:

答案 0 :(得分:1)

在您的client_secret.json文件中,在末尾添加 redirect_uris 块。 你的文件应该是这样的: { “网”:{ “CLIENT_ID”: “富”, “PROJECT_ID”: “酒吧”, “auth_uri”: “富”, “token_uri”: “酒吧”, “auth_provider_x509_cert_url”: “富”, “client_secret”: “bar”,“redirect_uris”:“http://domain_name _where_you_want_to_redirect /”}}