Questions tagged [http-status-code-401]

Similar to 403 Forbidden, but specifically for use when authentication is possible but has failed or not yet been provided. The response must include a WWW-Authenticate header field containing a challenge applicable to the requested resource.

The request has not been applied because it lacks valid authentication credentials for the target resource.

The server generating a 401 response MUST send a WWW-Authenticate header field1 containing at least one challenge applicable to the target resource.

If the request included authentication credentials, then the 401 response indicates that authorization has been refused for those credentials. The user agent MAY repeat the request with a new or replaced Authorization header field2. If the 401 response contains the same challenge as the prior response, and the user agent has already attempted authentication at least once, then the user agent SHOULD present the enclosed representation to the user, since it usually contains relevant diagnostic information.

See

1109 questions
3
votes
2 answers

file_get_contents HTTP request failed

I written simple php code to get some url content but it dosn't work it return this error file_get_contents(http://www.nature.com/nature/journal/v508/n7496/full/nature13001.html) [function.file-get-contents]: failed to open stream: HTTP request…
saboteur
  • 81
  • 1
  • 1
  • 6
3
votes
2 answers

How do I get an already (basic) authenticated context to call a web service behind the same authentication?

I have a site behind basic authentication (IIS6). Part of this site calls a web service that is also part of the site and thus behind basic authentication as well. However, when this happens the calling code receives a 401 Authentication Error. I've…
Matt Mitchell
  • 40,943
  • 35
  • 118
  • 185
3
votes
1 answer

Twython 401 on stream, but REST works fine

NO KIDDING. My code was working yesterday So I'm writing a script to get streaming data using twython. But today it's giving me 401 errors. Even with the example code I tried new keys, and a new app, but it still gives me 401. However, normal REST…
KGo
  • 18,536
  • 11
  • 31
  • 47
3
votes
3 answers

IOSLinkedInAPI: Can't share post with the LinkedIn API

I have been using following SDK to perform integration of LinkedIn into iOS and sharing post from iDevices. SDK is available here: https://github.com/jeyben/IOSLinkedInAPI In this code I can't find proper example code but however I had written some…
3
votes
2 answers

IIS 7.5 MVC 2 problem with 401.3 error

I have a mixed WebForms/MVC application I'm trying to deploy to our staging environment, which is a fresh install of Server 2008 R2, with IIS 7.5. This application works fine while developing on anyone's local machine (via visual studio's web…
Ben Lesh
  • 107,825
  • 47
  • 247
  • 232
3
votes
0 answers

deploying war using tomcat7.maven plugin in eclipse but always throwing 401 unauthorized error

Need your help with this issue. I'm trying to deploy war file at localhost:8080 through eclipse using tomcat7.maven plugin version 2.1 scripts but always getting 401 unauthorized error. My PC OS is windows 7 64 bit. Here is my POM:
3
votes
3 answers

handle 401 unauthorized error on windows Phone with Phonegap

I'm creating an application with phonegap on windows phone 7, that need an authentification on a server. When we log with the correct username and password, we got a 200 status. And everything works. But if we make a mistake on the login or the…
dpfauwadel
  • 3,866
  • 3
  • 23
  • 40
3
votes
1 answer

How to display HTTP 401 basic authentication dialog

I am new to web development. I have Android application that hosts some web pages using HTTPServer. I am using Netty to decode/encode request/responses. Now, I want to display basic authentication dialog when someone navigates to the my webpage.…
3
votes
1 answer

Error 401 when trying to deploy app from Google App Engine Launcher

I am having some issues with launching my first app from Google App Engine Launcher. I have already signed up for an account at the App Engine site. After I click on the deploy button, I get the deploy application to Google popup where I enter in…
3
votes
0 answers

Shopify API calls getting 401 Error unauthorize

I am using ShopifyAPIAdapterLibrary.ShopifyAPIClient class (from Shopify lib) to access shop data threw the Json API inside my application. My app was running well in the last month and after publishing to Beta version i was start getting this error…
Dayan Roee
  • 61
  • 1
  • 8
3
votes
2 answers

401 error while calling Exchange Web Service

Creating a web page that will connect to Exchange Web service and retrieve current user's Inbox items. The authentication needs to be integrated. We don't want anyone to login. Configured IIS to do Windows Authentication and set below parameters in…
MLofNY
  • 31
  • 2
3
votes
1 answer

Twitter API: 401 on POST, GET works fine

I have searched for a few days now, high and low and have not been able to get a POST to the twitter API to work correctly. I am able to successfully GET the request token and exchange it for an access token, but when I do a POST to statuses/update,…
puddinman13
  • 1,408
  • 4
  • 18
  • 35
3
votes
0 answers

HttpsURLConnection not returning 401 in Android

I've run into what seems to be a very strange problem. I'm using the HttpsURLConnection class in my Android app, and doing authentication using the Authenticator class. I can connect to a web service with inputted username and password, and get a…
3
votes
1 answer

Haskell curl missing content on status 401

I have some problems with the curl haskell library in the latest version 1.3.7. Some example in Haskell: module CurlTest where import Network.Curl url = "http://www.example.com/private/" opts = [CurlFollowLocation True] main = withCurlDo $ do …
3
votes
3 answers

MVC 3 401 Unauthorized on hosting server

I have an MVC 3 application that is giving me a 401 error when I try and access it from the remote server, but when I run it from my local computer it runs with out any error. The remote server has IIS 7 configured to allow both Forms and Anonymous…
joe_coolish
  • 7,201
  • 13
  • 64
  • 111