How to enable 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 for downloading the Launcher installer. Generate and copy the link to the Launcher installer in your Publisher Account (Launcher > General settings, or Launcher > Build settings if you chose Advanced customization when creating your Launcher). Then, replace the installer.launcher.xsolla domain in the generated link with dl.launcher.xsolla.
    • <otp_code> is the received OTP.

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

Was this article helpful?
Thank you!
Is there anything we can improve? Message
We’re sorry to hear that
Please explain why this article wasn’t helpful to you. Message
Thank you for your feedback!
We’ll review your message and use it to help us improve your experience.
Rate this page
Rate this page
Is there anything we can improve?

Don’t want to answer

Thank you for your feedback!
Last updated: June 25, 2021

Found a typo or other text error? Select the text and press Ctrl+Enter.

Report a problem
We always review our content. Your feedback helps us improve it.
Provide an email so we can follow up
Thank you for your feedback!