[SOLVED] function "Blynk.begin()" doesnt work well

I use ESP8266 with Arduino IDE.
I succeed perfectly with simple Arduino code.

next step.
I thought it is not easy for customer ( I’m professional) to prepare Arduino IDE and write SSID,Pass and token.
so I made server mode to get these data from iOS and Android.
To Flash them, they need be String. I know Blynk.begin() must be char* . Then I exchange string to char xxx[ ].

this is part of code and result.
3 strings are treated same way and I confirmed the token data a lots times. Completely same with null code.

I mean…
auth[ ] = “abcde1234…” => success to connect blynk server. (hard coding)
tokenArray[ ] =>>> [a][b][b][c][d][e]… => unsuccess , but SSID and Pass success to connect my AP

Who knows the reason ?

////////////////////////////////////////////////////////////////////////////////////////
String ssid = “SSID”; // these are global
String pass = “PWD”;
String token = “SilBurg”;

    :
    :
    :
    :

// in here, finished the server mode and get ssid,pass,and token as string

char tokenArray[token.length()+1]; // local array inside setup() arduino.
char ssidArray[ssid.length()+1]; // +1 for null code
char passArray[pass.length()+1];

for (int i = 0; i <= token.length() ; i++) { // exchange string to char array
tokenArray[i] = token[i];
if(i == token.length()){tokenArray[i] = ‘\0’;}
}

for (int i = 0; i <= ssid.length() ; i++) {
ssidArray[i] = ssid[i];
if(i == ssid.length()){ssidArray[i] = ‘\0’;}
}

for (int i = 0; i <= pass.length() ; i++) {
passArray[i] = pass[i];
if(i == pass.length()){passArray[i] = ‘\0’;}
}

Blynk.begin(tokenArray, ssidArray, passArray);

====================== RESULT ========================
[1422] Connecting to F660T-4LC9-G
[3423] Connected to WiFi <— Blynk can connect AP
[3423] My IP: 192.168.1.3
[3423] Blynk v0.3.1
[5001] Connecting to cloud.blynk.cc:8442
[5356] Invalid auth token <— but…

String objects have .c_str() method.
You can try using WiFiManager library by @tzapulica.

Great ! Thank you sooooo much !
I change my code ,

const char *x = token.c_str();
Blynk.begin(x, ssidArray, passArray);

success to connect to blynk server with auth token !
I’ll change ssid and pass this way and waist arrays.

Thank you again !!