get message from box using curl
how do i get the messages in my box account using php curl.
what is the api for that.
any help would be appreciated thanks in advance.
-
Thanks for clarifying! I understand what you are referencing now.
We don't have an API endpoint to get the list of messages shown in the Box web app, but you can use the Enterprise Events endpoint to recreate this. Here is the list of events that are available.
For example, in the messages section of the Box web app it includes collaboration invites, comment mentions, and task assignments. The corresponding events through the Enterprise Events endpoint would be COLLABORATION_INVITE, COMMENT_CREATE, and TASK_ASSIGNMENT_CREATE.
Here is a cURL example thats shows how to make this API call.
curl "https://api.box.com/2.0/events?stream_type=admin_logs&event_type=COLLABORATION_INVITE,COMMENT_CREATE,TASK_ASSIGNMENT_CREATE" \ -H "Authorization: Bearer REPLACE_WITH_YOUR_ACCESS_TOKEN"
You could get all these events within a Box Enterprise through the API and then filter them for a specific user. This approach would enable you to recreate similar functionality to the messages feature of the Box web app.
-
thanks for the reply i did this and it works fine and i want to know what will be the use of COMMENT_CREATE, TASK_ASSIGNMENT_CREATE in my queryand when i am trying to assign a task to someone there comes an error with a message {"type":"error","status":400,"code":"task_assignee_not_allowed","help_url":"http:\/\/developers.box.com\/docs\/#errors","message":"Assigner does not have sufficient privileges to assign task to assignee","request_id":"***number removed for privacy***6591ea104e6f92"}
サインインしてコメントを残してください。
コメント
5件のコメント