Sign In Register

How can we help you today?

Start a new topic
Answered

Node.js support for Javascript SDK

Hello,


As the titles says, is there any Node.js support planned for the Javascript SDK in the future ? I think it could be a great improvement as it'd be really useful to create a secure RESTful API for example (eg. to manage users from a website, like registration). The way it's currently done makes it difficult to implement when the user can clearly see the secret Api key/secret in the sources, this should be server-sided.


On the technical part, some functions are not available due to the nature of Node.js (like "navigator" or "window" functions which are only in browser based JS clients, etc.), that's why it's not working as is. I don't think it's an heavy work to adapt it for a server-based JS environment.


I will continue to look into it, but an official solution would be really useful.


Thanks,

Yann



Best Answer

Hi Yann


We do have a node.js SDK that is being used by a number of other customers. 


I'm in the process of getting most of our SDK's into public repositories, and have pushed the node one this morning to :


https://bitbucket.org/gamesparks/gamesparks-node-server-sdk


Gabriel


Is this code base valid anymore?  Because it seems really broken.  Certainly the documentation on https://bitbucket.org/gamesparks/gamesparks-node-server-sdk does not match the GameSparks.js module.  onError is not documented and onInit is not wired up.  There is no isReady() function.  The doc for sendAs() is totally wrong.  


Should I be trying to use this code?  Or is there something else available now?  Please advise.



2 people like this

Not sure if I know what I'm doing, but I'd like to use the node.js SDK from a Meteor server - problem seems to be that only an npm package will work:
http://w3foverflow.com/question/require-is-not-defined-in-a-server-side-meteor-method/

 ... any ideas?

Cheers,
--Rob

Got it,


Thanks,

Yann

Overview page, click the padlock in the top right. 


You want the Server API Secret

Hi there,


Since the secret doesn't seems to be the same as the APIsecret :

"secret - This is the server secret for you game. You will need to request this value for each game you want to use. IT IS NOT THE API SECRET in the portal. A different secret is configured for server to server communications as the access permissions are elevated."


Can you send me a correct one ?


Thanks,

Yann

Hello Gabriel,


You never cease to surprise me :)


That's perfect, i'll try it as soon as i can !


Thanks,

Yann

Answer

Hi Yann


We do have a node.js SDK that is being used by a number of other customers. 


I'm in the process of getting most of our SDK's into public repositories, and have pushed the node one this morning to :


https://bitbucket.org/gamesparks/gamesparks-node-server-sdk


Gabriel

Login to post a comment