Powershell and API Token usage

Sergio Sardo
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 29, 2023

HI to all.

I'm developing a PowerShell script to download JiraIsses.

If I use the basic credential approach ($JCred = get-credential 'user' ....) and then a command like: 
Get-JiraIssue -Query "<jql query>" -Fields "*all" -Credential $JCred

everything goes fine.

BUT

I've got a token (label + coded string)  and I need to use it instead than the esplicit user/psw pair.

In the web manual https://atlassianps.org/docs/JiraPS/about/authentication.html there is a note "The difference is, that instead of providing the username and password for the account, the email address and the API token must be used"
but there's no any sample on how/where I have to use the provided token....

So my question is:
How/Where I can use an API Token  to start a new session or send a Get-JiraIssue command?

Thanks in advance.

Sergio, Italy

0 answers

Suggest an answer

Log in or Sign up to answer