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
1 answer

using an http request to update google spreadsheet

Trying to set up a spreadsheet to take in data via an http post. To test it, I set up a simple python script to just send an http request. I dont want to use a specific google api on python or somewhere else, because I want some other people to be…
3
votes
1 answer

Receiving 401 "Unauthorized" error while using Google Cloud AutoML via HttpClient

I am writing a WPF application with C# that attempts to make an Google Cloud AutoML API call with HttpClient. I am able to make contact with the server but always get back an "Unauthorized" response. I have scoured StackOverflow and the AutoML…
3
votes
3 answers

401 - Unauthorized in cypress io auto testing

First time to write a Cypress (cypress Io framework) auto test for internal website (http://XXXX:8089/). The access of this website homepage requires special permissions by using active directory (get the windows credential and check if the user…
John
  • 71
  • 1
  • 3
  • 6
3
votes
0 answers

MVC + Ajax call to Controller Loses Authentication

I've seen similar issues in some posts but none of the answers have helped yet. My MVC app has a few AJAX/JSON response methods in one controller, and the calls get to destination but it doesn't work in IE or Chrome, and in mozilla it does, but…
3
votes
0 answers

Sorry, you are not allowed to create posts as this user

I am building Vue.js application with Wordpress and trying to implement simple contact form with help of Contact Form 7 plugin. So I encountered this issue: when I click 'send' button I receive 'Sorry, you are not allowed to create posts as this…
3
votes
1 answer

Nginx - Rate limit when origin server response code is 401

I would like nginx to rate limit by user-ip when the origin server responds with a 401 status code. How would I go about this. I already have a limit_req_zone setup for normal API calls which looks something like this: limit_req_zone…
3
votes
3 answers

Angular2 HTTP put add authorization header

I am trying to use http put in Angular. My code looks like this: const url ='this is my url'; const headers = new Headers({'Authorization': 'this is my token'}); return this.http.put(url, {headers: headers}).toPromise().then...... But I keep…
Zied Koubaa
  • 213
  • 1
  • 18
3
votes
1 answer

Getting "401" response code when trying to connect local server?

I've a local server which runs on http://192.168.0.101:8080/. Whenver I try to ping the server using following code I get response code as "401". My server requires password as "12345" try { URL url = new URL("http://192.168.0.101:8080/"); …
Kushal Bhalaik
  • 3,349
  • 5
  • 23
  • 46
3
votes
4 answers

Angular5 http reponse interceptor unable to read status code

I am trying to intercept http responses and redirect any 401's but the err object below is only returning me the following string. I was expecting to at least find the status code.. 401 - Unauthorized Details: Http failure response for …
Grant
  • 11,138
  • 32
  • 94
  • 140
3
votes
1 answer

How to use browser's default basic auth dialog pop up in angular2

I get the above error(401 unauthorised) on making a http post request to a server. I find many online sources suggesting to intercept it and make my own login interface but I would like to use the browser's default login interface for basic…
vanquishers
  • 358
  • 1
  • 3
  • 18
3
votes
2 answers

.NET core returning 500 instead of 401 when missing cookie

I have a .NET core API that uses cookie authentication. It is accessed by a PWA/SPA that has its own login route. In Startup.cs: public void ConfigureServices(IServiceCollection services) { ... services.AddIdentity(options => …
Keith
  • 150,284
  • 78
  • 298
  • 434
3
votes
2 answers

How to change the content of the 401 response to individual format?

I have a JAX-RS application on WildFly 10 which shall be secured by a simple Basic Auth. It works so far, but if the authentication fails, the server responds with Error
3
votes
0 answers

Gitlab Artifacts ERROR: Uploading artifacts to coordinator... forbidden

coming across an issue when using artifacts for the first time. The issue is visible when the CI runner tries to upload an artifact: ERROR: Uploading artifacts to coordinator... forbidden id=1698 responseStatus=403 Forbidden status=403 Forbidden…
3
votes
2 answers

Quickblox: Unable to get push Notifications with FCM getting errr 401

I want to implement push notification in app by FCM. The app is successfully getting FCM pushnotification but when i want to send from Quickblox admin pannel then that give me error like error_description":"Unable to deliver notification 20860148,…
3
votes
1 answer

ASP.NET IIS Authentication issue for some users

I have an ASP.NET repository site running on IIS6.0 and I have an issue that I can't reproduce, but three of the users have this problem every time (~20 other users run just fine). I'm pretty sure it has something to do with the IIS Authentication…
Richard
  • 33
  • 1
  • 4