I'm quite sure there is a better way to get the appname for API. I just need it to work so I can set qa up.