The docs for the endpoint show an example request and response: https://dev.twitch.tv/docs/v5/reference/users/#check-user-subscription-by-channel
The reason you’re getting a 401 response is because you need to send an Authorization: OAuth ... header with a User Access token for that channel which has the user_subscriptions scope.