Hi,
Thanks fro sharing the details.
Let me clear that "UnAuthorized Access" exception will occur on different-2 scnerio like:
1. You have not passed the APIKey and SecretKey or you have passed the APIKey & SecretKey is not correct.
2. Your device time is not correct if your replay attack is enable under AppHQ Management Console.
Also i recommend you to follow the FAQ which will help you in some basic points.
Let me know if it helps.
Thanks.