Authentication issue when performing a REST API call
I'm trying to get data from our company community TKB using REST api. We use SSO and it works fine.
I input the url in a browser:
http://community.ourcompany.com/ourcompany/restapi/vc/categories/id/ourcompany-tkb/search/messages?q=email&page_size=10&restapi.response_style=view
but I got an error response:
<response status="error">
<error code="303">
<message>
User -1 does not have the following permission(s) at ourcompany-tkb: [ read_category ]
</message>
</error>
</response>
If I logged into our website and input the url "http://community.ourcompany.com" in the browser, I could see that the SSO worked and I was identified as a logged user.
And then I input the previous url for invoking REST API again, I got all the data I needed successfully.
It seems that SSO authentication doesn't work on REST API.
What should I do to get the data via REST API if I don't input the url "http://community.ourcompany.com"?