Python BOXSDK JWTAuth 404 error when trying to upload file

回答済み
新規投稿

コメント

1件のコメント

  • eallan

    Fixed the error I was getting by adding myself as a user to the account (since I am not the owner). I used the following code:

    oauth = JWTAuth(
                    client_id='xxxxxxx', 
                    client_secret='xxxxxxx', 
                    enterprise_id='xxxxxxxx',
                    jwt_key_id='xxxxxx',
                    rsa_private_key_file_sys_path='xxxxxxx.pem',
                   )
    access_token = oauth.authenticate_instance()
    from boxsdk import Client
    client = Client(oauth)
    ev_user = client.user(user_id='***number removed for privacy***')
    ev_auth = JWTAuth(
                    client_id='xxxxxxxx', 
                    client_secret='xxxxxxxx', 
                    enterprise_id='xxxxxxxx',
                    jwt_key_id='xxxxxxxx',
                   
    rsa_private_key_file_sys_path='xxxxxx.pem',
                   )
    ev_auth.authenticate_app_user(ev_user)
    ev_client = Client(ev_auth)
    shared_folder = ev_client.folder(folder_id='***number removed for privacy***0')
    0
    コメントアクション パーマリンク

サインインしてコメントを残してください。