appErrorCode:1401, Client is not authorized for this operation

0 votes

Hi

I'm using Unity3D

I get this error when i'm trying to call methods: timerService.CreateOrUpdateTimer or gameService.CreateGame.

At first i login to Facebook and trying to call userService.Authenticate (FB.UserId, FB.UserId, userCallback). Authentication is working, i get success. In Callback for userService.Authenticate i call userService.SetFbAccessToken(FB.AccessToken);

I created a new key with permissions for all services, but i have the same error.

ApiKey and SecretKey are correct.

System time is correct also.

I can create timer using adminKey: timerService.SetAdminKey (Constant_App42.adminKey_App42); I's working.

But i should not to show adminKey in code.

How is to solve this problem?

asked Jul 8, 2014 in AppWarp by alexander.bargamin (16 points)

1 Answer

0 votes

If you have created ACL enabled app, then CreateTimer/CreateGame method can only be done by admin and not by the end user. That is the reason, you need to pass admin key to call this method. 

I dont think you need to call this method inside your app as you probably don’t need dynamic timer creation from the app.

We are working on to have creation of timer from AppHQ console itself for administrative purpose.

Let me know if it helps.

Thanks

Ajay

answered Jul 8, 2014 by ajay123 (899 points)
Thank you for your answer
thanks brother
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...