Create secret "must have admin rights"

I’m following the docs for adding a secret, using a token with the requisite permissions (including a newly-generated token with all scopes):

But when making the PUT request, it fails with 403 Client Error: Forbidden for url: with a payload: {'message': 'Must have admin rights to Repository.', 'documentation_url': ''}.

As owner of that repo, I necessarily must have admin access, right?

What am I missing?

Oh, gosh. I think I see the issue. The session object doesn’t have the state it had eariler (including the token).

PEBCAK; fixed.