Misc. API
setCredentials
The setCredentials function will overwrite the credentials of the configured network.
Note: This function will replace the network credentials in memory without invoking a connection or captive portal.
API Reference
NW.setCredentials("ssid", "password");