How to access Jira using PAT(Personal access token) in powershell

Pallavi Deore February 21, 2024

Hello All,

Is it possible to access Jira with Personal access token using Powershell.

If yes, please share the document or references which can help.

Regards

Pallavi Deore

1 answer

0 votes
Hariharan Iyer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 21, 2024

Hi @Pallavi Deore ,

 

The PAT can be used for any of Jira's REST APIs , and you can use Powershell's Invoke-RestMethod cmdlet to invoke REST APIs.

For a specific example of how to use the token in powershell, check the example on this page - https://developer.atlassian.com/cloud/jira/platform/basic-auth-for-rest-apis/

$Text = ‘user@example.com:api_token_string’
$Bytes = [System.Text.Encoding]::UTF8.GetBytes($Text)
$EncodedText = [Convert]::ToBase64String($Bytes)
$EncodedText

Hope that helps!

Suggest an answer

Log in or Sign up to answer