TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
United States Alhayek
NA
1
2.5k
403 Forbidden Access Error when accessing public Github API
Jun 8 2013 11:46 AM
So I am trying to simply get a list of public repos. No oAuth authentication is required, and if I browse to http://api.github.com/users/[user]/repos , I get a JSON response.
However, in the code I keep getting this 403 Error all the time! What am I doing wrong ?
Here's a copy of my code
ServicePointManager.ServerCertificateValidationCallback = new System.Net.Security.RemoteCertificateValidationCallback(AcceptAllCertifications);
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;
string url = "https://api.github.com/users/[user]/repos";
HttpWebRequest request = (HttpWebRequest) WebRequest.Create(url);
request.Method = "GET";
request.ContentType = "application/x-www-form-urlencoded";
WebResponse ws = request.GetResponse();
Reply
Answers (
0
)
How can I link together the two user control?
Need to read the data from RS 232 to C#