Cannot get a simple file download to work through box..api with curl

回答済み
新規投稿

コメント

4件のコメント

  • Peter Christensen

    Hi 

    1. Most likely you need to ensure that your app has the 'generate user access tokens' advanced feature turned on (and re-authorize after you make the change)

    2. Most likely the application service account does not have access to the folder you are trying to fetch. When you use the 'enterprise' subject in client credentials grant you will get a token for the service account. You can check this by running this API https://developer.box.com/reference/get-users-me/ which returns the current user. You can the copy the login from the output (should be 'AutomationUser....@boxdevedition.com') and share the folder using your logged in Box account. Then the API should return the folder.

    Hope this helps
    Rgds,
    Peter Christensen, Platform Solutions Engineer, Box

    0
    コメントアクション Permalink
  • Al Tan

    Hi Peter,

    Thanks for the prompt response. It works now after I checked the two boxes under "Advanced" as you suggested in solution 1: I was able to get the token as a user, then using the token to get folder and file. 

    I think it'd be nice if the documentation gives some clear explanation on what those options would enable. Various bits of info seem to scatter in different urls, making it hard to understand what each of those options would entail. Thankfully we have a support forum with quick responses, which is much appreciated.

    0
    コメントアクション Permalink
  • Al Tan

    By the way, there is another issue: the email for re-authorization after changing config seems to have stopped working. I tried multiple times and waited and never receive the email to authorize the change. I had to create a new app. I actually had the old app working a couple of months ago but with the new app I forgot which bit of config change was critical. With a simple download not working, combined with the authorization email not arriving, I was suspecting something was broken on box.com. Thus the question.

    0
    コメントアクション Permalink
  • Peter Christensen

    Thanks for the feedback, I will be sure to pass that on and check on the email for app authorization

    Rgds,
    Peter

    0
    コメントアクション Permalink

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