How to get PAT (personal access token) details without the website? #176469
-
| Select Topic AreaQuestion BodyI have a PAT and I need to check its details, like its name and permissions. How can I do it using REST or GraphQL API and without using the GitHub website? I've found out that I can check the expiry date in the HTTP response header if I use the PAT for any request for which it's sufficient and that's useful, but not enough. | 
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
| You can inspect a PAT without using the GitHub web interface by calling the GitHub REST API endpoint that returns information about the token you’re using: Using REST API 
 Look for the header: This tells you what permissions the token has. Using GraphQL 
 ✅ TL;DR 
 | 
Beta Was this translation helpful? Give feedback.
GitHub does not expose the PAT’s name via any API for security reasons.
The only ways to see it are:
✅ TL;DR