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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.