Event when connect wifi and connect thingerio server

can i detect event when connect wifi and connect thingerio server

i was try with Wifi.status but not show in Serial print

thanks, i have done for wifi. still wait event when connected to server thingerIO

//---------------begin connection
Serial.print(TAG);
Serial.println(" Connecting");
while (WiFi.status() != WL_CONNECTED)
{
delay(500);
Serial.print(".");
}
Serial.println("");
if (WiFi.status() == WL_CONNECTED)
{
delay(500);
Serial.print(TAG);

Serial.print("Connected, IP address: ");
Serial.println(WiFi.localIP());

digitalWrite(PIN_WIFI, HIGH);

}
//---------------end connection

hello @Ahmad_Basarudin,

Could be helpful if you tell us the device you are using, however, please check these topics:
for ESP8266:

for ESP32:

and I know that you are using WiFi but maybe for future doubts, here you can find how to implement ClientListener for other Arduino devices that are using tinyGSM:

Hope it helps