メインコンテンツまでスキップ

Extend SDK sample CLI app

Last updated on July 11, 2025

Overview

The Extend SDK sample CLI app is a command-line application provided to developers as a reference for using the AccelByte Extend SDK. It demonstrates how to implement the SDK in your own projects and is available in several selected programming languages, just like the SDK itself.

Goals

  • Build the sample CLI app from source
  • Use the sample CLI app to call AccelByte Gaming Services (AGS) endpoints

Prerequisites

  • Access to the AccelByte Gaming Services (AGS):
    • Use <your environment's domain URL> for AB_BASE_URL environment variable.
      • Example for AGS Shared Cloud customer: https://spaceshooter.prod.gamingservices.accelbyte.io
      • Example for AGS Private Cloud customer: https://dev.customer.accelbyte.io
    • Create an OAuth Client with client type Confidential.
      • Use Client ID value for AB_CLIENT_ID environment variable.
      • Use Client Secret value for AB_CLIENT_SECRET environment variable.
  • Access to the following tools:
    • Git
    • Python 3.10
    • Python IDE

Building

  1. Clone the AccelByte Python Extend SDK repository.
  2. Go to samples/cli.
注記

The Python version does not need to be built and it can be executed directly.

Usage

Setting up

export AB_BASE_URL="https://<environment>.accelbyte.io"
export AB_CLIENT_ID=<value>
export AB_CLIENT_SECRET=<value>

# For Python Extend SDK sample CLI app only (--login-as user)
export AB_USERNAME=<value>
export AB_PASSWORD=<value>

Logging in

Login using OAuth client

AccelByte.Sdk.Sample.Cli.exe --op login --lt client

Login using username and password

AccelByte.Sdk.Sample.Cli.exe --op login --user <username> --pass <password>

Calling an endpoint

For example, calling IAM get country location v3 endpoint.

AccelByte.Sdk.Sample.Cli.exe --sn iam --op GetCountryLocationV3

Help

To show usage help:

AccelByte.Sdk.Sample.Cli.exe

See the sample CLI app README for more information.