Thank you for your reply so quickly @Dist , and for the suggestion.
Yes, I also tried to use OAuth authorization code flow to get the OAuth, by passing the correct params as the doc described:
GET https://id.twitch.tv/oauth2/authorize
?client_id=<your client ID> // I got this correct id
&redirect_uri=<your registered redirect URI> // set to https://localhost:8080
&response_type=code
&scope=<space-separated list of scopes>
But what I got is CORS error with redirect to /login route to the Twitch API.
Is that a correct response? Or is there any way to get this Twtich OAuth programmatically?
Thank you.