Authorizing a page with twitch

You can either use the Get Users endpoint https://dev.twitch.tv/docs/api/reference#get-users and not specify any params which will cause it to return the user associated with that OAuth token (including their id).

Alternatively you can use the Validate Token endpoint https://dev.twitch.tv/docs/authentication#validating-requests which will also work to provide you the user_id associated with the token, and some data about the token itself such as scopes, client id, and expiration.

If their id is the only thing you need then either option will work to get you what you need.