Issue with Get Moderators endpoint

If your token doesn’t have a user id, then that means you used the Client Credentials flow and generated an App token, which isn’t associated with a user and so can’t have the scopes required to access endpoints that require permission from the user.

You need to use the Implicit https://dev.twitch.tv/docs/authentication/getting-tokens-oauth#oauth-implicit-code-flow if you’re making requests client-side

or the Auth Code flow https://dev.twitch.tv/docs/authentication/getting-tokens-oauth#oauth-authorization-code-flow if making requests server-side