I want to get the title of my stream for my chatbot

A HTTP API is you make a cURL request to a URL and data comes back.
And with the Chat API (technically its an API) you make a socket connection then you can send/recieve chat messages.

So you’d need a cURL library (for language of choice), since JS, if in the browser you’d use fetch since it’s built in.

Since a chat bot you could use node-fetch as it works the same way

An incomplete javascript snippet that works for browser and nodeJS:

for node your’ also need to invoke/require node-fetch

                fetch(
                    'https://api.twitch.tv/helix/channels?broadcaster_id=123123',
                    {
                        "headers": {
                            "Client-ID": client_id,
                            "Authorization": "Bearer " + access_token
                        }
                    }
                )
                .then(resp => resp.json())
                .then(resp => {
                    // do stuff with resp as it will match whats in the example response linked above