How to include Device Name (Not just Device ID) in SMS when using Messaging Cloud API (Twilio)

Sorry, I should have explained.
I’m saving anything to EPROM. Here is the where that is used

char dev_name[32];
String deviceName;
void loop{
alertPowerSms = String::format("{\"Name\": \"%s\", \"To\": \"%s\"}", deviceName.c_str(),  setPhoneString.c_str());

I did try 10 seconds the most but I will try to extend that even further. Its just odd that it will work right away if I do a hard shutdown.

How would you try to write a String to EEPROM?
You cannot use EEPROM.put() with String.

And instead of having an intermediate deviceName why not directly use dev_name?

Like this

char dev_name[32];
char phone_str[32];
char alertPowerSms[128];
  snprintf(alertPowerSms, sizeof(alertPowerSms)
          , "{\"Name\": \"%s\", \"To\": \"%s\"}"
          , dev_name
          , phone_str

I wasn’t planning on saving as a String.

I’ll remove the intermediate deviceName. Did you think that us the issue?

No dice … same results.