Status of live stream

Refer to the documentation for the library you are using to transmit over RTMP

But as I said if the stream key is wrong you’ll get DC’ed and the library should error.
If the stream key is right, then your library will start sending data.

FFmpeg for example will just not start sending data and error out:

For example.

This is the only way to know.

Either poll the API to see if the stream started OK according to Twitch
Or listen to events emiitted by your RTMP library.