Newbie to API, was all fine, now getting 401

Hello all,
been on GH for a while, but dipping my toe into API and personal access tokens. I have a python script which gets the tags from some of my public repos.

I was very happy when it all worked, now hammering at it during testing…all was going well until at some point I got a 401 error. I created a new token, and the very first attempt at using is got a 401 too.

Have I done something wrong / bad? If so , how do I find out what and avoid it in future?

Any suggestions welcome!

The error code by itself is pretty vague. Are you getting any kind of error message, or headers that indicate you exhausted the rate limits?