Personal access token expired despite being used every day #30560
-
I have a personal access token used in a script which uses advanced search on a daily basis. I started getting emails that my access token was going to expire, but the token was still regularly used. Even after running the script manually and confirming it was returning search results, the token expiry still happened. How can I ensure that my active token does not expire? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
You can choose when your token will expire when you generate it. If you choose anything other than "No expiration" it will expire after that time, no matter how much you use it. So to avoid expiration choose the "No expiration" option when generating the token, after considering the security implications (if someone can steal it, they can have access until you notice and revoke the token). In that case use actually matters, your token will still expire if it's unused for a year. |
Beta Was this translation helpful? Give feedback.
-
I realized soon after posting this my mistake :) Thank you for the reply |
Beta Was this translation helpful? Give feedback.
-
the email I rec'd from Github indicated: "If this token is still needed, visit https://github.com/settings/tokens/1449241018/regenerate to generate an equivalent." but that link generates a 404 error! |
Beta Was this translation helpful? Give feedback.
You can choose when your token will expire when you generate it. If you choose anything other than "No expiration" it will expire after that time, no matter how much you use it.
So to avoid expiration choose the "No expiration" option when generating the token, after considering the security implications (if someone can steal it, they can have access until you notice and revoke the token). In that case use actually matters, your token will still expire if it's unused for a year.