Can't get custom string attr to show up in channel box

cmds.addAttr(
sphere_xform,
keyable = True,
dataType=‘string’,
shortName= ‘alt’,
longName=‘alternativeName’) # creating attr in node editor but not channel box.

It is likely because “dataType string” is not animatable.

Yeah string types can’t be shown in the channel box but they will show up in the attribute editor under the “extra attributes” section as a text field, so you can read & edit their values there.