Need assistance on executing curl: "shared items" feature.

新規投稿

コメント

5件のコメント

  • jmoldow_box

    The curl example for that endpoint is this:

     

    curl https://api.box.com/2.0/shared_items
    -H "Authorization: Bearer ACCESS_CODE"
    -H "BoxApi: shared_link=SHARED_LINK"

     

    So for you, the call would be

     

    curl https://api.box.com/2.0/shared_items
    -H "Authorization: Bearer ACCESS_CODE"
    -H "BoxApi: shared_link=https://app.box.com/s/vrvaf2wxdiwf11bup5w0bb5w08ihenz3/1/***number removed for privacy***3"

     

    You might need to URL-encode the shared link value, but I'm not sure.

     

    If the shared link has a password, then you'd need to do

     

    curl https://api.box.com/2.0/shared_items
    -H "Authorization: Bearer ACCESS_CODE"
    -H "BoxApi: shared_link=SHARED_LINK&shared_link_password=SHARED_LINK_PASSWORD"
    0
    コメントアクション Permalink
  • Box Product Support

    Hi, thank you for your reply.

    Can you please tell me what argument should I pass to the "BoxApi" (string) parameter to test this feature on "try it" (as can be seen in the screenshot) on Box API reference?

    I want to test some features on this tool, before I can develop my app, since it's beneficial in learning different references of Box API.

    box_tryit.PNG

     

     

    Thanks.

    0
    コメントアクション Permalink
  • jmoldow_box

    I just tried it, and it looks like that endpoint isn't quite working as intended. I filed a bug for it to be fixed.

     

    In the meantime, you should be able to get it to work by typing shared_link=YOUR_SHARED_LINK into the value for BoxApi, and leaving the other fields blank.

    0
    コメントアクション Permalink
  • Miroku_87

    I'm bumping into this problem as well.

     did you manage to have any answer to your ticket?

     

    Thank you!

    0
    コメントアクション Permalink
  • mself

     and , we recently updated the docs for how to access shared items via the API.  Please let me know if this provides the information you were looking for: https://docs.box.com/reference#get-a-shared-item

    0
    コメントアクション Permalink

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