SA World SDK Documentation
  • 🛠 ENVIRONMENT SETUP
    • Overview
    • Getting Started
    • Sign Up for SAW SDK
    • Integration Steps
      • Step 1 - Install packages
      • Step 2 - Request credentials
      • Step 3 - Environments
      • Summary
    • SAW Sample Package
  • 🖥 SDK Integration Guides
    • Getting Started
    • Initialization
    • Authentication
    • Type Definition
    • User Data
      • getUser()
      • Account Data
        • getAccount()
        • getSub()
        • getEmail()
        • getName()
        • getUsername()
        • getGivenName()
        • getFamilyName()
      • Active Citizen Data
        • getCitizen()
        • getCitizenId()
        • getCitizenName()
        • getCitizenCode()
        • getCitizenWallet()
        • getCitizenLevel()
        • getCitizenAvatar()
      • Balance Data
        • getAP()
      • Saved Game Data
        • setGameData(...args)
        • getGameData()
      • Quest Data
        • getProcess()
        • claim(...args)
      • Friend Data
        • getFriendList()
        • sendFriendInvitation(...args)
        • responseFriendInvitation(...args)
        • getFriendInvitationList()
        • inviteGame(...args)
    • Game Play
      • Match Data
        • startMatch()
        • completeMatch(..args)
        • getMatchHistoryById(...args)
        • getAllMatchHistory(...args)
    • Quest
      • getList()
    • Achievement
      • getList()
  • 📌 Links
    • Report an Issue
    • Telegram Community Channel
    • Twitter
    • Discord
    • Facebook
Powered by GitBook
On this page
  • Asynchronous authenticate Game Client with your proven credentials:
  • Step 1. Call the initAsync() function asynchronous to start to initialize your game:
  • Step 2. If our system authenticates your game client, you can start using our GameClient API functions. Example:
  1. 🖥 SDK Integration Guides

Authentication

Integration Guide

Asynchronous authenticate Game Client with your proven credentials:

The GameClient class provides you a way to create a client for your game to connect to our system with many functions such as game authentication, creating user playtime, updating the status and the data of user playtime, v.v.

Step 1. Call the initAsync() function asynchronous to start to initialize your game:

client.initAsync()
.then(() => {
    // Write your code here.
})
.catch((error) => {
    // Handle error.
})

Step 2. If our system authenticates your game client, you can start using our GameClient API functions. Example:

const citizenCode = client.user.citizen.getCitizenCode();
PreviousInitializationNextType Definition

Last updated 1 year ago