Get SharedLink info using REST API - error
Hello
As an alternative method to using the Java SDK to retreive SharedLink Info, I'm attempting to use the REST API (https://docs.box.com/reference#get-a-shared-item) to retreive a shared link using its id.
The Bearer token was granted using a Service Account (App) with all possible permissions.
Example:
curl -X GET -H "Authorization: Bearer qwdBXXXXXXXXXXXT30Uto" -H "BoxApi: shared_link=1d4ic1yz3xxxxxxxxfnc1ob" "https://api.box.com/2.0/shared_items"
but get an error 400:
{ "type": "error", "status": 400, "code": "bad_request", "context_info": { "errors": [ { "reason": "invalid_parameter", "name": "shared_link", "message": "Invalid value '1d4ic1XXXXXXXXXXX7fnc1ob'." } ] }, "help_url": "http://developers.box.com/docs/#errors", "message": "Bad Request", "request_id": "153204XXXXXXXXXXf21a4" }
Please assist
-
Good afternoon nachumzisman,
you have to write down the whole Shared link not only the alphanumeric ID:
https://app.box.com/s/1d4ic1yz3xxxxxxxxfnc1ob
I hope that it helps.
Please sign in to leave a comment.
Comments
1 comment