401 Unauthorized from GitLab API after personal access token expiry: distinguishing expiry from scope or revocation failures
Goal I want a reliable way to detect that a GitLab personal access token has expired, as opposed to being revoked, mis-scoped, or rejected for another reason, so that an automation job can trigger rotation instead of failing silently. Assume a recent GitLab version (16.x) where PATs require an expiration date and administrators can cap token lifetime. Constr