xbox xbl web-service lists, gets,
creates, updates, and deletes the web services of a Partner Center seller, and creates their
certificates. Reading them needs the Relying parties and Business partners read
permissions in Partner Center, and changing them or creating a certificate needs their write
permissions. For what a web service can do, see
Setting up web services at Partner Center
in the XBOX developer documentation.
Like every xbl command, these commands are Experimental: their options and output might change
or be removed. See Experimental commands.
create makes the web service for the seller’s default business partner. For another business
partner, create the web service and its certificates in Partner Center.
A delete can’t be undone, and it takes away none of the web service’s access: certificates created
for it keep working, with that access, until they expire. To stop using a web service, keep it:
remove it from your games’ access policies, and
turn off its telemetry and app channels access with update. XBOX services take that access away
in the background, which deleting the web service stops. Kept or deleted, a web service keeps its
access to content in each of the seller’s sandboxes. A game whose access policies name a deleted
web service fails its next configuration validation until you remove it from them.
Options
Examples
List the seller’s web services:Creating a certificate
certificate create makes a 2048-bit RSA key pair on your computer, sends only the public key,
and saves the certificate it gets back with the private key in --dest. The file’s extension
picks its format:
On macOS and Linux, only you can read the file. On Windows, a new file gets its folder’s
permissions, so the CLI refuses
.pem there and saves the key only in a .pfx or .p12 file.
The CLI never replaces a file, so --dest must be a new file, and its folders can’t be symbolic
links or junctions. Each run creates another certificate, and several can be in use at once, so
to renew one, create another before it expires.
If the web service’s business partner is in the seller account’s draft but not published, the
certificate can’t sign in to XBOX services: requests for XBOX services security tokens (XSTS
tokens) with it fail with business_partner_required. When you see that error, run
xbl config status --scope account. If it shows hasChanges as true, review the draft with
xbl config diff --scope account --lines, because a publish makes every change in it live, then
publish it with xbl config publish --scope account.
Create a certificate for a web service, valid in every sandbox:
Using your own key
With--public-key-file, the CLI makes no key. It sends your 2048-bit RSA public key and saves
only the certificate, as PEM, in a .pem, .cer, or .crt file. Pass the public key in PEM,
as openssl rsa -in key.pem -pubout writes it, or as the base64 key blob Partner Center’s
PowerShell script prints. A private key is refused, so it’s never sent.
Output
list writes an array of web services, or [] when there are none:
businessPartnerId is the business partner the web service acts for. The seller account’s own ID
there means the seller’s default business partner, which create always uses; certificate create
refuses a web service with any other (business_partner_not_supported). get, create, and
update write one web service the same way, and delete writes it as it was. The table shows
WEB SERVICE ID, NAME, BUSINESS PARTNER, TELEMETRY, and APP CHANNELS.
certificate create writes what it saved:
sandbox is the sandbox the certificate is limited to, or null for every sandbox. thumbprint
is its SHA-1 thumbprint, and notAfter is when it expires, in UTC. The table shows THUMBPRINT,
EXPIRES, and SANDBOX.
Exit codes
Errors
A refused request exits1 and writes a JSON error to stderr, as Errors
describes. These are the ones you’re most likely to see:
