Is the documented API end point to obtain the stream key from the API
You’ll need to have performed oAuth and logged in the user to Twitch with the channel:read:stream_key scope.
Alternatively just give the user a input field to copy/paste their key into.