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

Flutter Call REST API WITHOUT AUTH ALWAYS RETURN 401

I am new to flutter and currently doing some testing on flutter sample code (Form App). I am trying to change the URI to my existing login REST API (which tested with postman and working fine). But it's always return result.statusCode == 401 when…
user3607582
  • 61
  • 11
-1
votes
1 answer

Invoke-WebRequest : The remote server returned an error: (401) Unauthorized

I can download https://marketplace.visualstudio.com/_apis/gallery/publishers/blueprint/extensions/vsts-open-work-items-in-excel/0.1.71/package?noPrompt=true in my browser. I don't need to be authenticated. it might use a cookie or something. but the…
Shahyad Sharghi
  • 660
  • 9
  • 12
-1
votes
1 answer

Basic Auth / JWT Token, removing Basic Auth popup

I use the combination of basic auth and spring security (JWT token) (Springboot) I have the following setup: web.xml
Benno
  • 289
  • 1
  • 3
  • 10
-1
votes
3 answers

API calls with JWT authentication returns 401

I have a .NET 6 Web API application that uses JWT authentication. The front end is an angular application. When I make an API call with the bearer token in the header, it returns the 401 error code. But with the same bearer token, I am able to call…
Ben Phung
  • 316
  • 4
  • 15
-1
votes
1 answer

Not able to send http Request with authorization header in my Azure function when deployed in Server

I have used HttpClient and I'm setting Authorization headers to it, when I run my Timer Trigger and HTTP trigger functions locally Everything is working fine and able to get the expected response, But, when I deployed the same in the production…
-1
votes
2 answers

How can I consume web service from business central (Java)?

I want to consume Business Central Web service so I can add it to an existing web application. I have tried: Testing with Postman using Authorization header (works) Testing SoapUI (works) But I am getting this error: …
-1
votes
1 answer

Keycloak creating user for an existing realm?

I'm trying to create a user for an existing realm and client. Below, is what i tried. The URL, realm, username, password, clientId and clientSecret is correct. But it throws NotAuthorization exception on line var response = keycloak.realm( realm…
miador
  • 358
  • 1
  • 5
  • 20
-1
votes
1 answer

lftp pget 401 Unauthorized

Yo I'm trying to download a file from DigitalBlasphemy.com using lftp and pget on cygwin on windows. Now, the usual route involves logging in to the website via web browser (It asks for username and password). When I try to use lftp's pget command…
TheIronKnuckle
  • 7,224
  • 4
  • 33
  • 56
-1
votes
2 answers

HTTP Response code 401 on HttpUrlConnection.getInputStream

Please consider the following code snippet: URL url = new…
klib009
  • 263
  • 5
  • 18
-1
votes
1 answer

Windows authentication 401 error, SPN to Service account

I'm struggling around and hope you can help me. Scenario: I wrote a web application on a test server and all works fine. I moved the finished application to the live system and I receive a HTTP 401 error if windows authentication is enabled on IIS.…
-1
votes
1 answer

Status code 401

I have a 401 Error to HTTP Request - 401 (UNAUTHORIZED) on console.log, how I can solve this problem? GET somelink 401 (UNAUTHORIZED) api.js:35 Error: UNAUTHORIZED at Request. (client.js:423) at…
-1
votes
1 answer

Getting a MethodAccessException(in event log of server) and HTTP Error 401 Unauthorized(at client side) in WCF Rest Service in IIS6.0 Win2K3 enviorn

I wrote a WCF REST based service that uses webHttpBinding and uses JSON to post data.This service works fine in all of our internal environments. But in one of our environment which is exact replica of Production. It is not working. If I inspect in…
Mohit
  • 914
  • 4
  • 14
  • 28
-1
votes
1 answer

401 error when trying to GET to OWIN SelfHost

I try to GET query from MVC app to OWIN SelfHost. Both have WindowsAuth. MVC is running from Visual Studio in one virtual machine, OWIN SelfHost works as service in other virtual machine. Response is always 401. I tried to set…
-1
votes
2 answers

401 error while using HttpComponentsClientHttpRequestFactory

Am getting 401 Unauthorized error for few of the URLs when using HttpComponentsClientHttpRequestFactory, however it works fine when using Simpleclienthttprequestfactory. The reason why i want to use HttpComponentsClientHttpRequestFactory is for…
Furiouz
  • 1
  • 2
-1
votes
1 answer

How to create a new random API Key for the user with permissions assigned making cURL POST request

I'm trying to run a POST to SendGrid's API to get an Authentication User API Key, but I don't think I'm understanding how posting with a body actually works in PHP. SendGrid has given me the following information that I need to make the call in…
Jodo1992
  • 745
  • 2
  • 10
  • 32
1 2 3
73
74