0 Replies Latest reply on Mar 25, 2015 9:35 AM by pcrownov

    Admin Authorized Add-On not able to see Drafts through API


      I have an Add-On that I have authorized to have full access: add_on_screenshot.png


      I have been trying to access the Drafts of a specific place and every time I was going through my app it was returning 0 results even though I knew Drafts existed. I took the URL that was being sent through and put it in the browser, and the results I was expecting were returned. I finally used curl to make the request using admin credentials and the call worked fine and returned as expected, however, when I used the Auth Token of my app instead, 0 results were found. I tested the Auth token on another call and it worked fine so I know it was correct. Am I missing something here? Shouldn't the Add-On/Anything authorized with the bearer token be able to access Drafts or is this a bug? Any input is appreciated! Ryan Rutan


      Calls I used:

      To get Drafts:

      curl -X GET 'http://<community>/api/core/v3/contents?includeBlogs=true&filter=status(draft)&filter=place(http://<community>/api/core/v3/places/1023)&count=100' -u <admin_user>:<admin_password> -v  (This One Worked)

      curl -X GET 'http://<community>/api/core/v3/contents?includeBlogs=true&filter=status(draft)&filter=place(http://<community>/api/core/v3/places/1023)&count=100' -v -H 'Authorization: Bearer <token>'  (This One Didn't)


      To make sure Token works:

      curl -X GET 'http://<community>/api/core/v3/contents?includeBlogs=true&filter=place(http://<community>/api/core/v3/places/1023)&count=10' -v -H 'Authorization: Bearer <token>'