Announcements
No record found.
Hi All,
I am trying to get data using a client provided API. Postman shows data is coming from client app. I have created a batch job using Sys operation framework. Now, I am trying to info the same data that postman is showing me in its grid. After I hit OK button on my batch job, I get The Remore Server Returned an Error (403) Forbidden error. Can you please guide me what is the issue ?
I have tried to debug my code. The below mentioned code is what I received from debugger's StackTrace. Can you help me understanding what information it conveys.
Sorry. I do not know what It is looking like this. Earlier, It was fine while I was writing.
Hi 00030000036294D5,
Please check if the accessToken is incorrect or invalid.You can follow the steps described in the below link:
www.youtube.com/watch
Hi,
While trying from postman, you would have passed the token or authentication keys ? Have you passed such authentication in your class?
Hi Anitha,
Yes, It is using basic authentication and I have used username and password in my code. Let me share my code as well.
System.Net.HttpWebRequest request; System.Net.HttpWebResponse response; System.Byte[] byteArray; System.IO.Stream dataStream; System.IO.StreamReader streamRead; System.IO.StreamWriter streamWrite; System.Net.ServicePoint servicePoint; System.Net.ServicePointManager servicePointmgr; System.Net.HttpVersion version; CLRObject clrObj; Newtonsoft.Json.JsonReader reader; System.Text.Encoding utf8; Counter countCounter; Object obj; Map data; System.Byte[] byteArraynew; System.Net.WebHeaderCollection headers = new System.Net.WebHeaderCollection(); new InteropPermission(InteropKind::ClrInterop).assert(); str byteStr = strfmt('%1:%2', "USERNAME", "PASSWORD"); headers = new System.Net.WebHeaderCollection(); url = "http://dummy.restapiexample.com/api/v1/employees"; clrObj = System.Net.WebRequest::Create(url); request = clrObj; request.set_Method("GET"); request.set_KeepAlive(true); request.set_ContentType("application/json"); utf8 = System.Text.Encoding::get_UTF8(); byteArraynew = utf8.GetBytes(byteStr); byteStr = System.Convert::ToBase64String(byteArraynew); headers.Add("Authorization", 'Basic ' byteStr); request.set_Headers(headers); servicePoint = request.get_ServicePoint(); System.Net.ServicePointManager::set_Expect100Continue(false); System.Net.ServicePointManager::set_SecurityProtocol(System.Net.SecurityProtocolType::Tls12); response = request.GetResponse(); dataStream = response.GetResponseStream(); streamRead = new System.IO.StreamReader(dataStream); jsonString = streamRead.ReadToEnd(); info(strFmt("RESPONSE: %1",jsonString)); dataStream.Close(); response.Close(); }
On username and password, I am using credentials that are being used on postman. On URL, I am using the API url provided by the client. Is this code right ? please guide me .
The above pic is what I am getting as an error
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our 2026 Super Stars!
Thanks to all of our 2025 Community Spotlight stars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Giorgio Bonacorsi 493
André Arnaud de Cal... 413 Super User 2026 Season 1
Syed Haris Shah 242 Super User 2026 Season 1