Seamless Web-to-launcher Authorization

How It Works

With seamless web-to-launcher (WTL) authorization, users who have logged in to the website distributing Launcher via Xsolla Login are automatically logged in to the installed Launcher.

Who Can Use It

Partners who have already integrated Launcher and Login.

How to Get It

On your website, set up getting a one-time password (OTP) and adding it to the Launcher installer download link:

  1. To get an OTP, send the POST request to https://launcher.xsolla.com/otp.
    • If you didn’t set up the OAuth 2.0 authentication for your project, send a request containing only the Authorization: <JWT> header.

Example

Copy
Full screen
Small screen
curl -X POST "https://launcher.xsolla.com/otp" -H "accept: application/json" -H "Content-Type: application/json" -H "Authorization: <JWT>"

    • If you set up the OAuth 2.0 authentication for your project, send the request with the Authorization: <JWT> header. The request body must also contain a JSON with access and refresh tokens: {"access_token": "", "refresh_token": "user_refresh_token"}.

Example

Copy
Full screen
Small screen
curl -X POST "https://launcher.xsolla.com/otp" -H  "accept: application/json" -H  "Content-Type: application/json" -H "Authorization: <JWT>" -d "{  \"access_token\": \"string\",  \"refresh_token\": \"string\"}"

Note: When the OTP is requested, an end user must be authorized to the website and have a valid JWT or OAuth 2.0 access and refresh tokens.

  1. The received OTP is a string containing 36 characters in the UUID format. Add it as a query parameter to the Launcher installer download link in the format below, where:
    • <download_link> is the link to the Launcher installer;
    • <otp_code> is the received OTP.

Copy
Full screen
Small screen
https://<download_link>?otp=<otp_code>