Skip to content
Discussion options

You must be logged in to vote

GitHub does not expose the PAT’s name via any API for security reasons.

The only ways to see it are:

  1. Via the GitHub web interface: Settings → Developer settings → Personal access tokens.
  2. Keep a record yourself when creating the token (e.g., in a secure vault or environment variable).

✅ TL;DR

  • API can show scopes and authenticated user, but token name is never available via API.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@CodeSandwich
Comment options

@yoter-k
Comment options

Answer selected by CodeSandwich
@CodeSandwich
Comment options

@yoter-k
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API and Webhooks Discussions related to GitHub's APIs or Webhooks Question Ask and answer questions about GitHub features and usage
2 participants