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

401 Unauthorized while using Pinboard API for add post in Android

Hey all, I am using the Pinboard API for adding a post from my Android App. Each time I send the GET request with the required credentials and arguments, I get the 401 Unauthorized response code. I tried the same URL from a PHP code and the post…
bangdel
  • 2,523
  • 5
  • 28
  • 42
2
votes
2 answers

Testing Controller with PHPUnit, but it throws a 401 Error

I'm doing some tests with PHPUnit, but I have some problems especially when testing the Controller. I want to test a route of a Controller by just calling the route and check if the response is a HTTP-Status 200. But alwas the Console has the smae…
N.H.
  • 79
  • 1
  • 10
2
votes
1 answer

Discord API tells me: "401: Unauthorized" when i make a GET with Google-Scripts: "UrlFetchApp.fetch()"

I'm setting up a api connection. I want to get informations from discord api for my app. So I implemented OAuth2 without any problems, I have my access token. Then I tried query some endpoints (/users/@me, /users/@me/guilds,...) but every time I get…
2
votes
2 answers

Python Adal - Can't use Access Token to retrieve Outlook Messages

I've recently been attempting to port a email extraction process from Powershell to Python using the Azure active directory for Python library. I've been attempting to use the acquire_token_with_client_credentials function to do this but I've hit a…
2
votes
0 answers

Is there way to drop WWW-Authenticate in Chrome when 401 is received through AJAX redirect?

I'm using AJAX to make call, withCredentials = true, to IdP service. It returns response message with form which redirects to another URL. Only in Google chrome, it prompts for credential in which I assume 401 is received, but I want it to fail,…
jkim
  • 152
  • 1
  • 3
  • 15
2
votes
1 answer

Agile JIRA Authentication failure

I am trying to get the token for my agile-jira server but getting "401 Unauthorized" for the below url I am using to get it done. https://agile-jira.mycompany.com/jira/rest/auth/1/session I am using Authorization as Basic Auth In…
2
votes
1 answer

HTTP 401 Basic Authentication error accessing Magento 2 Rest API

I am attempting to use the Rest API in Magento 2. I have a piece of PHP that uses cURL to first get an admin token for my Magento user, then use the token to return a piece of Magento data (in this example a list of product types). The first part…
Matthew
  • 61
  • 1
  • 6
2
votes
0 answers

Exception while fetching value of first key vault secret for the application

In my application I am getting exception when my application fetches value of first key vault secret. The exception I am only getting when I turn on "Common Language Run-time Exceptions" from exception settings. Exception that I am getting…
2
votes
1 answer

Analytics API v3 | Error 401 (Invalid Credentials) Only On A Few Accounts

Hey I work for a marketing agency and I've developped a small script in Google AppScripts that pulls data from my customers' Analytics accounts and formats it into a Google Slides presentation. How it works: Our customers give us access to their…
2
votes
3 answers

Spring Boot bearer token authentication giving 401

I am new to Spring boot so please help me. I have got it working to the point where I am able to generate a Bearer Token with an unauthenticated request. Next I want to use this token to use with an endpoint so that my request is authenticated -…
kk1957
  • 8,246
  • 10
  • 41
  • 63
2
votes
1 answer

Azure Key Vault 401 authentication errors

I am fetching secret values from key vault for my azure stateless service fabric application and getting 401 dependency errors (if I check via connected application insight) for only 2 key vault secrets out of 100s key vault secrets. Below given is…
2
votes
3 answers

airtable get request 401 (Unauthorized)

I made a GET request to airtable table, but with the right key and right url he give me the 401 (Unauthorized) error. fetch("https://api.airtable.com/...") .then(response => response.json()) .then(data => { …
2
votes
1 answer

IIS 401.3 With Windows Authentication 2016

I am moving some old web applications from an old Server to a Server 2016. We are using a domain account for the application identity and we need to use windows authentication. I am getting a 401.3 error when I try a test.html page on the server. …
JoeDirt80
  • 21
  • 1
2
votes
0 answers

Dynamics 365 (Online) crm WebAPI Http Status Code (401) was expected in the response

I am trying to create a native C# application (using the WebAPI) that has been registered with Azure AD. This application will need to create specific entities in the crm but that is almost irrelevant for my question. I tried using the example the…
Nanyo
  • 87
  • 1
  • 10
2
votes
0 answers

Post request is giving 401 Unauthorized user error with HttpClient Angular 5

In my angular 5 application, I am having the get and post requests which are as follows: Get request: constructor(private httpClient:HttpClient){ this.httpClient.get(this.url_string,{ withCredentials: true }).subscribe(data => { this.name = data; …