Why id.twitch.tv is not responding?

while i’m doing POST request to id.twitch.tv I’m getting error: Socket connection timeout.

const optionsGetToken = {
    hostname: 'id.twitch.tv',
    path: '/oauth2/token',
    method: 'POST',
}

const reqGetToken = https.request(optionsGetToken, (res) => {
// some code        
})

reqGetToken.write(JSON.stringify({ 
// my values in json  
}))

I tried to do ping id.twitch.tv in powershell but i’m getiing Request timed out

how can I handle this?

It’s working fine here.

So something between you and the route to get to twitch

Pings will fail due to a network configuration Twitch’s side.
A ping fail doesn’t tell you anything other than it’s likely the target has a firewall that drops Ping requests.

So if ping doesn’t work here, is there any other way so I can just check if I’m able to connect to id.twitch.tv?

By loading it in a browser, example tool:

https://barrycarlyon.github.io/twitch_misc/authentication/implicit_auth/

and I should just click one of buttons or configure it for my app and then click?

ok it worked in both ways so i’m able to connect to id.twitch.tv.
Also curl worked but https.request still does not

Then you need to add more debugging to your code and investigate further which is somewhat outside of our realm.

In node, which is what this looks like, I tend to use Fetch.

But I suspect your issue is something to do with SSL and your code cannot SSL verify or something obscure

As theres nothing obviously wrong here