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

Request Method: POST Status Code: 401 Unauthorized While Clicking a Button to submit the form through Cypress Automation

I am trying to Click on a Button that submits the inputs during the automation in Cypress. While performing manual entry the data is submitted but while submitting through Cypress the input doesn't submit and leads to Status Code: 401 Unauthorized.…
1
vote
1 answer

Session variables getting lost when navigating to a different controller (& AJAX requests), however session vars set during Session_Start is intact

This question is about an issue we are facing with a .net framework based MVC app that uses windows authentication. The variables set during Session_Start seems to be just fine and available throughout, but any session variable set after the fact…
k25
  • 397
  • 6
  • 24
1
vote
1 answer

Is there a way to differentiate the statuscode 401 of a page pre authentification and after closing the promtp?

so i have a webpage with a login section. Login is done with .htaccess and .htpasswd file. That works fine. Now i need to style or customize the "unauthorized" page that results after closing the authentification prompt. Here is my problem: If I…
1
vote
0 answers

REST API with basic auth method doesn't work when trying to use inherit

Ive got a rest api that connects with a MQ queue. Im using the IBM tools such as App connect enterprise, and MQ Explorer of IBM. The thing its that when I send rest, using basic mode, the request results in 200 (ok). Ive assigned the values of users…
1
vote
0 answers

Exception: Request failed for https://rest.clicksend.com returned code 401 For sending outbound messages using google appscript

So I am trying to make a program using google Apps Script that could send outbound messages to the mobile numbers I have stored using google sheets. Also, the API that I have used for the triggering of SMS is clicksend. However, I am receiving an…
1
vote
1 answer

GET method gives success but PUT method gives 401 despite same credentials

The problem Overview When getting products using a GET method everything works when trying to update a product using PUT method I get 401 unauthorized I use same credentials for both methods The bearer token is global scope, I should be authorized…
KraveXL
  • 305
  • 3
  • 12
1
vote
0 answers

Postman - 401 unauthorized status | Spring Boot

I prepared very simple REST APi. I am trying to do requests with postman but i get 401 Unauthorized. No matter what kind request it is. I have Windows 11 system, Java 11, Postman Version 9.8.2 Postman: application.properties…
Marco Cor
  • 55
  • 8
1
vote
0 answers

Dispatch logout action from axios interceptor

Please let me know how to wrap the Axios interceptor to catch the api response for token expiry i.e 401 and call a dispatch action for logout from context, I would like to know how to call hooks inside the Axios. Came up with the following solution…
1
vote
1 answer

How can I troubleshoot a 401 error from MS Dataverse through R?

Yesterday I was using the following code to get data out of my MS Dataverse through R. It was working fine. require(httr) require(rvest) dataverse_api = oauth_endpoint(request = NULL, authorize =…
SIE_Vict0ria
  • 174
  • 1
  • 10
1
vote
0 answers

ALB Target Health check failing with the status - "Health checks failed with these codes: [401]"

I am trying to figure out why my ALB Target Group is not passing the health check and throwing a 401 (Unauthorized) error. Details are: ALB Listener 443 forwarding to Target Group. AWS Linux RHEL 7.9 Server. Application Load Balancer. I have my ALB…
1
vote
1 answer

sonar qube is throwing vulnerablity issue for xss in authentication entrypoint

I am trying to override the standard error response in case of 401 in springboot using authenticationentrypoint in commence method I am building my custom error object which involves below line String responseMsg =…
1
vote
1 answer

jhipster microservices client springcloud config with authorization header to jhipster registry

I am using jhipster 7 with springboot 2.5.4 for microservice applications development (DEV env) I have setup jhipster registry server running on my localhost port 8761 with docker's help. I am trying to access jhipster central springcloud config…
1
vote
1 answer

Why is the same Youtube API request returning 401 in a different project?

I am fetching playlistItems from the Youtube Data API via this URL: URL =…
1
vote
1 answer

HERE reverse geocoding API endpoint returns 401

I've taken the HERE Reverse geocoding API endpoint from the docs and I can successfully make a GET request in Postman with some random lat/long coords. This is the…
1
vote
1 answer

Airflow api authentication example from the documentation is giving me a 401

Using airflow version 2.1.2 I'm trying the following API call from the airflow documentation: ENDPOINT_URL="http://localhost:8080/" curl -X GET \ --user "admin:hello" \ "${ENDPOINT_URL}/api/v1/pools" But it's not working for me. The result…
Rick Giuly
  • 983
  • 1
  • 14
  • 19