User System

User system is used to manage SG users, including signup, login and kids (family members ) management, etc. Most of the functions use web pages control as part of the process flow. To handle response of these functions, you need to register a listener in your WebView event inside an App.

Signup

API
 GET /signup
Description

After signing up, system logs user in automatically.

Example
https://gameapi.smartgamesltd.com/signup
Response
  • In WebView page load finished event, you can get the JSON result by parsing Javascript function GetResult().
  • Return JSON string of SGMember.
  • Please refer to 【Response Code Definition】for more detail.
WebPage

Login

API
 GET /login
Description

Login page.

Example
https://gameapi.smartgamesltd.com/login
Response
  • In WebView page load finished event, you can get the JSON result by parsing Javascript function GetResult().
  • Return JSON string of SGMember.
  • Please refer to 【Response Code Definition】for more detail.
WebPage

Forgot Password

API
 GET /forgot-password
Description

Forget password page.

Example
https://gameapi.smartgamesltd.com/forgot-password
Response
  • In WebView page load finished event, you can get the JSON result by parsing Javascript function GetResult().
  • Please refer to 【Response Code Definition】for more detail.
WebPage

Change Password

API
 GET /change-password
Description

Change password page.

Example
https://gameapi.smartgamesltd.com/change-password
Response
  • In WebView page load finished event, you can get the JSON result by parsing Javascript function GetResult().
  • Please refer to 【Response Code Definition】for more detail.
WebPage

Parental Lock

API
 GET /parental-lock
Description

You can use parental lock utility view before important actions.

Example
https://gameapi.smartgamesltd.com/parental-lock
Response
  • After successfully enter the code, it redirects to [My Account] page.
  • If the user haven't created any kid (family member), , it redirects to [My Kid] page.
WebPage

My Kid

API
 GET /my-kid
Description

The flow is for creating new kid (family member) of the user.

Example
https://gameapi.smartgamesltd.com/my-kid
Response
  • In WebView page load finished event, you can get the JSON result by parsing Javascript function GetResult().
  • Please refer to 【Response Code Definition】for more detail.
WebPage

Select Kid

API
 GET /select-kid
Description

The flow is used to select a kid to play.

Example
https://gameapi.smartgamesltd.com/select-kid
Response
  • In WebView page load finished event, you can get the JSON result by parsing Javascript function GetResult().
  • Please refer to 【Response Code Definition】for more detail.
WebPage

My Account

API
 GET /my-account
Description

My account main entry page.

Example
https://gameapi.smartgamesltd.com/my-account
Response

Response my-account web page.

WebPage

Get Open ID

API
 GET /openid
Description

Obtain Open ID (SG ID) after user login.

Example
https://gameapi.smartgamesltd.com/openid
Response
  • Return JSON string of {"OpenID": 100001}.

Login By Token

API
 GET POST /loginbytoken
Description

Login into the system by previously saved token.

Example
https://gameapi.smartgamesltd.com/loginbytoken?token=my_token
Parameters
  • Previous saved token.
Response
  • In WebView page load finished event, you can get the JSON result by parsing Javascript function GetResult().
  • Return JSON string of SGMember.
  • Please refer to 【Response Code Definition】for more detail.

Verify Session ID

API
 GET POST /verifysession
Description

Verify if current session ID is valid.

Example
https://gameapi.smartgamesltd.com/verifysession?gamekey=my_gamekey&sessionid=my_sessionid&openid=my_openid&sign=my_sign
Parameters
gameKey Your developer identification.
sessionId Current session ID.
You can obtain it after login.
openId SG member ID.
You can obtain it after login.
sign Signature generated from above three parameters.
Please refer to signature algorithm.
Response
  • In WebView page load finished event, you can get the JSON result by parsing Javascript function GetResult().
  • Return JSON string of SGMember.
  • Please refer to 【Response Code Definition】for more detail.

Logout

API
 GET /logout
Description

Log user out.

Example
https://gameapi.smartgamesltd.com/logout
Response