I want to automate using Jira as part of our deployment processes but it's not clear to me that there's a PAT (personal access token) endpoint that allows you to determine if your access token is still valid or not. I would use some other endpoint like one to get your profile or an issue but this also requires setting the account_id for each developer or some random issue id which seems like a fragile and unnecessarily burdensome workaround solution.
How do other people determine if their PAT is still valid for use with the API for Jira as part of an automated process / workflow?
Welcome to the community @AJP !
Sadly, there are no validators for PAT's. To find more information about the API and PAT's, you can refer to this page: https://confluence.atlassian.com/enterprise/using-personal-access-tokens-1026032365.html
Bear in mind that this is for the server version.
Hello @AJP
If a user makes a call to the Get current user endpoint with an invalid key + token, they will get a 401 error. Ergo, by inverse logic, if they get a normal response, their key + token is valid.
PS. The term 'Personal Access Token' or 'PAT' refers to the Jira Server / Data Centre platform. On the Cloud platform, they are just called 'API tokens' to differentiate them.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Spend the day sharpening your skills in Atlassian Cloud Organization Admin or Jira Administration, then take the exam onsite. Already ready? Take one - or more - of 12 different certification exams while you’re in Anaheim at Team' 25.
Learn more
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.