Documentation

Unity Gaming Services CLI


GitHub Repository

Unity Gaming Services CLI


Login

Safely stores the Service Account Key ID and Secret key locally.
Read time 1 minuteLast updated 21 hours ago

Safely stores the Service Account Key ID and Secret key locally.
Note
This is a base command specific to the CLI that allows you to make authenticated calls to our apis. It is not related to the Authentication Unity Service.

Interactive usage

By default, calling this command prompts you to enter your service account
key-id
and
secret-key
.
ugs loginEnter your key-id: <your-key-id>Enter your secret-key: <your-secret-key>

Automated usage

You can automate login by using both the
--service-key-id
option and the
--secret-key-stdin
option.
The
--service-key-id
option expects your service account
key-id
as argument.
The
--secret-key-stdin
option expects your
secret-key
in the standard input.
ugs login --service-key-id "your-key-id" --secret-key-stdin < "secret-key-file"
Where
"your-key-id"
is your service account
key-id
, and
"secret-key-file"
is the path to a file containing your service account
secret key
.

Options

Option

Alias

Description

key-id--service-key-idThe key-id of your service account. Must be used with "--secret-key-stdin".
secret-key--secret-key-stdinThe secret-key of your service account. Must be used with "--service-key-id".
help-?, -h, --helpDisplay help and usage information.
quiet-q, --quietReduce logging to a minimum.
json-j, --jsonUse JSON as the output format.

Environment Variables

Logging in with Environment Variables

To log in manually use the
ugs login
command.
To log in with system environment variables, set
UGS_CLI_SERVICE_KEY_ID
and
UGS_CLI_SERVICE_SECRET_KEY
to your system's environment variables.
Authenticated calls follow an order of priority for authentication:
local configuration
>
Service Account Key ID and Secret key environment variables