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
T
Tech Support
said
over 7 years ago
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 :
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
Tech Support
said
over 7 years ago
Overview page, click the padlock in the top right.
You want the Server API Secret
Y
Yann Pingot
said
over 7 years ago
Got it,
Thanks,
Yann
R
Robert Lombardo
said
almost 7 years ago
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
A
Andrew Peebles
said
over 6 years ago
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.
Yann Pingot
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
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
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstTech Support
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
Yann Pingot
Hello Gabriel,
You never cease to surprise me :)
That's perfect, i'll try it as soon as i can !
Thanks,
Yann
Yann Pingot
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
Tech Support
Overview page, click the padlock in the top right.
You want the Server API Secret
Yann Pingot
Got it,
Thanks,
Yann
Robert Lombardo
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
Andrew Peebles
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
-
Documentation Notes
-
Design issues with user events
-
Using NoSQL
-
Runtime Collections vs Metadata Collections
-
Anonymous authentication from browser app
-
Modules
-
Movement With Unity
-
Problem with url parameters for downloadables
-
Querying NoSql GameSparks database
-
Challenge accesType
See all 2487 topics