It’s a bit hard to know what’s going on without seeing your code and config and knowing your Sitecore version but some things to check are:
Login Cookies
Are you getting the login cookies from the login endpoint and passing the login cookies in your request to the API? Here is an example of a get item request. The login cookies are created by a separate request which I’ve not included the code for.
HttpWebRequest request = WebRequest.CreateHttp($"https://{_baseAPIUrl}/sitecore/api/ssc/item/{HttpUtility.UrlEncode(parentItemId)}/children?includeStandardTemplateFields=true");
request.Method = "GET";
request.ContentType = "multipart/form-data";
request.CookieContainer = loginCookies;
using (WebResponse response = request.GetResponse())
{
using (Stream stream = response.GetResponseStream())
{
using (StreamReader streamReader = new StreamReader(stream))
{
string responseContent = streamReader.ReadToEnd();
}
}
}
Security Policy
Check your security policy setting is correct. I’d recommend the following which allows remote requests:
<settings>
<setting name="Sitecore.Services.SecurityPolicy">
<patch:attribute name="value" value="Sitecore.Services.Infrastructure.Web.Http.Security.ServicesOnPolicy, Sitecore.Services.Infrastructure" />
</setting>
</settings>
The API Docs for 9.0 are here:
https://doc.sitecore.com/developers/90/sitecore-experience-manager/en/the-restful-api-for-the-itemservice.html