AUTHENTICATION_DENIED error when accessing Confluence content via REST API Call

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Problem

A user with the correct permissions and privileges is receiving an AUTHENTICATION_DENIED error code when attempting to access Confluence content via the REST API. The user's credentials are correct and no other permissions issues would account for why this error would appear for the requestor.

Example

Below is a sample request that is sent to retrieve content from Confluence REST API:

1 curl -v -u admin -X GET "http:<Confluence-Base-URL>/rest/api/content/rest/api/content?type=blogpost&start=0&limit=10&expand=space,history,body.view,metadata.labels" | python -mjson.tool

Here is the response received after supplying the correct credentials

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 > GET /rest/api/content/rest/api/content?type=blogpost&start=0&limit=10&expand=space,history,body.view,metadata.labels HTTP/1.1 > Host: HOST:PORT > Authorization: Basic XXXXX > User-Agent: curl/7.54.0 > Accept: */* > < HTTP/1.1 401 Unauthorized < Server: Apache-Coyote/1.1 < X-Seraph-LoginReason: AUTHENTICATION_DENIED < WWW-Authenticate: OAuth realm="HOST" < Content-Type: text/html;charset=utf-8 < Content-Language: en < Content-Length: 1116 < Date: Wed, 20 Feb 2019 23:07:20 GMT < { [1116 bytes data] 100 1116 100 1116 0 0 13605 0 --:--:-- --:--:-- --:--:-- 13777 * Connection #0 to host localhost left intact

Response

Diagnosis

Environment

  • Confluence

Cause

If a user has previously failed authentication more than the allowed times before the CAPTCHA challenge is triggered, the user may receive the AUTHENTICATION_DENIED error until their Failed Login Count is reset.

Solution

Resolution

  1. From the Confluence UI, ⚙ -> User Management

  2. Search for affected user and click on the user name from the search results

  3. From the user profile, review the user profile and note the value for Current Failed Login Count. This value may be greater than your current allowance (see Configuring CAPTCHA for Failed Logins for more info).

  4. If the failed login count is high, you can manually set the failed login count for the user back to zero by clicking Reset Failed Login Count.

  5. Reattempt your call to the REST API

Updated on March 31, 2025

Still need help?

The Atlassian Community is here for you.