Hello,
I write a servlet to send push when requested.
I use this code :
App42API.initialize(ConfigValues.APP42_API, ConfigValues.APP42_KEY);
App42API.setLoggedInUser("XXX");
PushNotificationService pushService = App42API.buildPushNotificationService();
LogService lgs = App42API.buildLogService();
lgs.debug("Start sending Message to user :" + user, "PushServlet");
PushNotification pushNotificationObj = pushService.sendPushMessageToUser(user, msg);
But I ALWAY RECEIVE the error
{"app42Fault":{"httpErrorCode":401,"appErrorCode":1401,"message":"UnAuthorized Access","details":"Client is not authorized"}}
What is Wrong ?
The Api and key are constant and I use it and the user autentication and work.
I need to wait after APP42Api.Initialize ?
I Disable the "Replay Attack" for prevent time errors but never change, alway get the same error.
I see you examples but look like this.
Can you help me ?
Best regards