Welcome to the new Box Support website. Check out all the details here on what’s changed.

Comments

1 comment

  • jcleblanc

    Hi ,

     

    There is one approach that I would probably look into here to see if it can work. Simply providing a shared link to a file, or the like, won't work. What you need is a fully qualified, authorized URI, to fetch the file. We can do that by using the file download API endpoint, then supply an access token in the query string parameters. Essentially the URI would look something like this (which is what you would put in the src):

     

    https://api.box.com/2.0/files/${fileId}/content?access_token=${token}

    You would supply the file ID and the token in there. 

     

    The token itself can be any of the available sources that is scoped to access that file, such as:

    1. An access token from the OAuth 2 process [ guides here ]
    2. A developer token generated from the developer console [ guide here

    That should get you what you need, but you'll need to manage that token as it'll only be good for an hour before needing to be refreshed. 

     

    - Jon

    0
    Comment actions Permalink

Please sign in to leave a comment.