Set up as a Github App then use the app's client ID as username and app's client secret as password.
curl --request POST \
--url "https://api.github.com/applications/YOUR_CLIENT_ID/token" \
--user "YOUR_CLIENT_ID:YOUR_CLIENT_SECRET" \
--header "Accept: application/vnd.github+json" \
--header "X-GitHub-Api-Version: 2022-11-28" \
--data '{
"access_token": "ACCESS_TOKEN_TO_CHECK"
}'
Set up as a Github App then use the app's client ID as username and app's client secret as password.
https://docs.github.com/en/rest/authentication/authenticating-to-the-rest-api?apiVersion=2022-11-28#authenticating-with-a-token-generated-by-an-app
example: