Forum Discussion

jaikumar1's avatar
jaikumar1
Mentor
6 years ago

API permission issue

Hi, As we have a requirement to get the unread mail count for each users. We just identified the API  /restapi/vc/users/id/[id] /mailbox/notes/inbox So while trying to use the API, it returns th...
  • Parshant's avatar
    6 years ago

    Hi jaikumar1 ,

    If you are facing permissions issue on hitting browser API. You can directly call the API in Endpoint or in Custom component. You will not face same permission issue over there.

    If you want to see the XML data how it will look like. you can check this article for all related nodes.

  • AdamN's avatar
    6 years ago

    jaikumar1 Are you passing in an API session key when making the call? The "User -1" would tend to indicate that the API sees you as an anonymous user. If you haven't already, you might try obtaining an API session key for an admin user and see if you still receive the same error.

    Parshant is correct that you would likely not run into the same issue if using the restadmin context object in an endpoint or custom component, though you may need to still ensure that your endpoint/component is properly permissioned/secured to avoid any security risks.