You can’t use an Opaque ID in place of a Twitch User ID for API requests.
Please read the docs about Opaque IDs: https://dev.twitch.tv/docs/extensions/required-technical-background/#opaque-ids
And what may also be helpful is to check the extension reference docs to learn where Opaque IDs are used, and where Twitch User IDs are used: https://dev.twitch.tv/docs/extensions/reference