Go to All Forums

Issue while getting data using API


Suddenly I started Getting the Error "The remote server returned an error 403 forbidden" in My C# Code while getting data from Site24 API . It was working few days back but now stopped working. Below is my Code. Token is also active in account. What i am missing. ?

innerurl = "https://www.site24x7.com/api/reports/sla_reports/availability?period=3";
var httpWebRequest = (HttpWebRequest)WebRequest.Create(innerurl);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Accept = "*/*";
httpWebRequest.Method = "GET";
httpWebRequest.Headers["Authorization"] = "My Token Here";
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse(); [Here it gives 401 Forbidden]
Reply 1
Replies (1)

Re: Issue while getting data using API

Hi Vandan,

    Hope you are able to get the reports now, if not please contact support@site24x7.com as it will involve some troubleshooting of your account.

Generally 403 forbidden error is thrown in the following scenarios,

1. Wrong authtoken or token deleted.

2. The user does not have permission to access to that module.

3. The role could have been changed. 
Product Manager, Site24x7
Reply 0