How to WiFi reconfigure without changing BLINK_AUTH_TOKEN?

Hi all.
Can I reconfigure WiFi connection without changing BLINK_AUTH_TOKEN?
Before that I thought that the define BLYNK_AUTH_TOKEN “xxxxxxxxxxxxxxxxxxx” was hardcoded token for the device, but it turned out that after reconfigure Device auth_token changes also. How to do it?

BR,
Artem.

Check this out
https://docs.blynk.io/en/commercial-use/deploying-products-with-dynamic-authtokens#why-use-dynamic-authtokens

Having the auth token change shouldn’t be a problem, unless you’re using the API as well.

Pete.

1 Like

It is problem when I use Batch Update of the Datastreams through /external/api/batch/update?token={token}&{pin1}={value1}&{pin2}={value2}, as you know.
Therefore, I need to somehow change the wifi settings (sometimes need it) without changing the auth_token.

Artem.

If it’s a personal project then it’s probably easier to change the auth token in the API call whenever you have to change the WiFi credentials.
Otherwise it’s probably a case of going back to the old WiFiManager library.

Pete.

It is not very convenient, the remote client can independently change the Wi-Fi and the main program that monitors the remote device via the API will lose connection to this device. In the old WiFi library, the client will not be able to change the Wi-Fi settings on his own.

There’s nothing to stop you going back to that setup, but that clashes with your statement that…

Pete.

How to programmatically know the Auth_Token in the device after the Wi-Fi provisions?

If you’re using the Edgent sketch then it seems to be stored in the variable configStore.cloudToken

Pete.

Yes, works ok.
By the way using Batch update DataStreem is very convenient and faster for updating a large number of Virtual Pin instead of Blynk.virtualWrite() command.