"Invalid OAuth token"

You are generating a token and not trying to use your client secret as a token?

Assuming when you copied the example from the docs, and changed the Token to your generated token.

This suggests the token has expired and needs to be renewed.

A token is either valid for 4 hours or 60 days depending on type.

You can use the validate API or a tool like Token Checker | Twitch API Example to test your token.

But the API already did this for you and is reporting the token as invalid