GSM requires knowing the details of the Request Type and Data (JSON) to be sent with each request and also parsing the response / messages sent back. It only has a few actions, but they can be used to make a variety of the available GS requests with properly user formatted request type and JSON data sent.
To see the details of the available request types and data to send, look at the gamesparks-functions.js source code available in the GS JS SDK available here: https://docs.gamesparks.com/sdk-center/javascript.html
You must have a GameSparks account and project to test. Set apiKey and apiSecret to GS object properties in the example before testing.
For debug, make extensive use of browser console to review messages and responses between client and server.