Need assistance on executing curl: "shared items" feature.
Hi, I am a beginner in Box development.
I need to get familiar with Box API, so I started with 'curl' method for learning.
I am trying to execute a curl command 'shared item', but unfortunately I am unable to set the header (parameters) correctly. Please let me know, what does Box Api header means. If you can give me a sample input for its execution, I will be very thankful.
Following is the shared link I have:
https://app.box.com/s/vrvaf2wxdiwf11bup5w0bb5w08ihenz3/1/***number removed for privacy***3
P.s. I did some research online to find solution to my problem, but remained unsuccessful in getting any response.
Thanks.
-
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/vrvaf2wxdiwf11bup5w0bb5w08ih
enz3/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"
-
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.
Thanks.
-
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
サインインしてコメントを残してください。
コメント
5件のコメント