Can I authenticate using just a username and api_token?

John Lawlor May 9, 2024

Hi,

We don't use email to login in my organisation, just a username and password. 

Can I use the username and api_token with rest api and c#? 

 

e.g

var base64Credentials =    Convert.ToBase64String(Encoding.UTF8.GetBytes("username:api_token_string"));
request.Headers.TryAddWithoutValidation("Authorization", $"Bearer {base64Credentials}");

 

Thanks,

1 answer

0 votes
Clark Everson
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 31, 2024

Hi @John Lawlor 

Generally if you have an API token you may not even need your username. However I am unsure of interaction with C# though there are extensive python jira libraries for both cloud and data center: https://jira.readthedocs.io/

 

Best,

Clark

Suggest an answer

Log in or Sign up to answer