Sign In Register

How can we help you today?

Start a new topic
Answered

Executing Cloud Code without playerId

My use case involves an external content creation system which generates JSON and sends it to GameSparks, where it is processed and stored in MongoDB. I could have the tool call a custom event using the REST API to do the data processing, but without a playerId it fails with an "NOTAUTHORIZED" error. Is it advisable to use Cloud Code events for tasks which don't directly relate to one particular user? 

I know I could use the NoSQL REST APIs to do everything externally, but the data processing would be much easier to do in Cloud Code. 

Is there a better way to run some custom logic on GameSparks for my use case?


Thanks.


Best Answer

Hi Jordan,


A callback as suggested above by Jeff would be a good way to go about this. Have a read through the linked documentation and if you have any further questions just let us know.


Regards,

Liam


Okay. I just found the callbacks tutorial. I have to say that I was surprised to read that callbacks are scripts on GameSparks that you can call from an external server. I think that solves my problem though. 


1 person likes this
Answer

Hi Jordan,


A callback as suggested above by Jeff would be a good way to go about this. Have a read through the linked documentation and if you have any further questions just let us know.


Regards,

Liam

Login to post a comment