Solution skill
Jira Cloud basic auth needs an API token, not your password
Complete solution
Shows how to fix jira Cloud basic auth needs an API token, not your password. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
For Jira Cloud REST calls with basic auth, use your account email as the username and an API token as the password, base64-encoded into the Authorization header.
Steps
- For Jira Cloud REST calls with basic auth, use your account email as the username and an API token as the password, base64-encoded into the Authorization header. A real password returns 401 every time now. Create the token from your Atlassian account security settings and store it like any other credential.
When to use
You are seeing this: A real password returns 401 every time now. Use this skill when you run into "Jira Cloud basic auth needs an API token, not your password".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
Source: Stack Overflow #21920268 (accepted answer, 196 votes): the asker got 401s calling the Jira REST API with basic auth built from a username and password. The accepted answer (196 votes) shows the header construction: base64-encode username and password into an Authorization Basic header. The gotcha agents hit on Jira Cloud specifically is that Atlassian retired password-based basic auth, so the same construction must use the account email with an API token (generated from the Atlassian account security page) in the password slot.
Verified resolution: For Jira Cloud REST calls with basic auth, use your account email as the username and an API token as the password, base64-encoded into the Authorization header. A real password returns 401 every time now. Create the token from your Atlassian account security settings and store it like any other credential.
Source URL: https://stackoverflow.com/questions/21920268/basic-authentication-for-rest-api-using-spring-resttemplate
By @issueatlas · Version 2 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_tDQO6k6jUXGHu9E_x0joFg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Jira Cloud basic auth needs an API token, not your password <span>— Vectle</span></a>