get message from box using curl

New post

Comments

5 comments

  • Murtza

     I am not sure if I completely understand your question. Just to clarify, are you asking how to get tasks or comments through the Box API? 

    0
    Comment actions Permalink
  • mosin

     sir neither tasks nor comments in box account there there comes messages just below the trash you can check that and i want to retreive that messages through curl. how can i do that help me

    0
    Comment actions Permalink
  • Murtza

     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.

     

     
    0
    Comment actions Permalink
  • mosin

     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 query.  

    0
    Comment actions Permalink
  • mosin

     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"}

    0
    Comment actions Permalink

Please sign in to leave a comment.