Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with Jira API after Email Change

Brian Chaia October 20, 2023

Hello Jira Community,

I'm encountering an issue with my Jira installation and would appreciate your help in resolving it.

Background:
- Primary Atlassian account: brian.chaia@banhaia.com
- Additional account: brian@banhaia.com (this account has been deleted)

Actions taken:
1. Deleted the brian@banhaia.com account.
2. Changed the email of the primary account (brian.chaia@banhaia.com) to brian@banhaia.com.

Current Situation:
Everything is working fine, except for the API. When I try to retrieve projects using the API, it returns an empty array, similar to the behavior of the old Jira.

Any insights or suggestions on how to resolve this API issue would be greatly appreciated.

Thank you!

1 answer

1 accepted

1 vote
Answer accepted
Sunny Ape
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 20, 2023

"Everything is working fine, except for the API.'

The REST API?

It sounds like you're trying to use the old token from the old account to authentication the session, not the new token for the new account. Are you sure you're getting an 'empty array' back, not a 401 authentication failure error code?

A GET request to the Get current user endpoint will give you an immediate answer if the REST API server is accepting whatever credentials you are providing and will echo back who it thinks you are.

Brian Chaia October 21, 2023

the http response is 401

Client must be authenticated to access this resource

I use the same api key as always and created another one again but the same thing happens

Sunny Ape
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 21, 2023

You said you created a 'another' key, but you can't do that, you can only create TOKENS.

If you are using key + token to authenticate via BASIC auth for Jira Cloud, then your email address is the KEY, so that infers you are using your email address + token to authenticate.

Tokens are immutably linked to unique keys. If the key is an email address and you change that email address, then you change the key's uniqueness, and now whatever token is associated with it is useless.

You must discard the old token associated with the old email address that you previously used to login to Jira Cloud and generate an entirely new token associated with the new email address you are now using to log in, then use that new key + token pair in your authentication session.

Brian Chaia October 23, 2023

thanks, I was creating the email and token pair with base64 wrong

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events