In order to view sites via a temporary URL using your shared IP address then "~username", you have to have the mod_userdir tweak enabled. In WHM, go Security Center -> mod_userdir Tweak and make sure it is enabled. Note: if you are using mod_ruid2, you can't use the mod_userdir tweak.
Once you've enabled the mod_userdir tweak, if you want all your users to be able to access their sites via a temporary URL, then check the Exclude Protection box for DefaultHost (nobody).
If you want only a few of your users to be able to access their sites via a temporary URL, say during development before their DNS are set, just include their usernames in the "additional users" box on the same line as DefaultHost (nobody). The Exclude Protection box doesn't need to be checked.
The documentation for the mod_userdir tweak is at:
Apache mod_userdir Tweak - Documentation - cPanel Documentation