When the authentication changed and the mobile service was replaced by an app service, do you see an error? There is information about the common error codes and information about API authorization here https://github.com/enableiot/iotkit-api/wiki/Api-Home .
I also found this link which has lots of useful information on REST API. Take a look at http://www.programmableweb.com/news/how-to-add-restful-api-to-intel-edison-and-work-it/sponsored-content/2016/01/05 and let me know if you found this helpful.
If the previous code worked then I believe it would be easier to get the proper authentication/authorization configuration to get the code to work instead of modifying the existing code.
I found some links you might find useful: