How to enable seamless authorization

How it works

When a user is logged in to a website that distributes a launcher, the launcher account is automatically logged in.

Who can use it

Partners who have already integrated Launcher and Login and connected OAuth 2.0 authentication.

How to get it

To enable seamless authorization, implement the following:

  1. Retrieval of a one-time password.
  2. Adding a user’s one-time password to the launcher installer can be done in one of the following ways:

Retrieval of a one-time password

To implement obtaining a one-time password, make a POST request to the URL address https://launcher.xsolla.com/otp. In the request body, pass a JSON with the following parameters:
  • refresh_token - user refresh token. Required.
  • access_token - user access token. Required.
Note
refresh_token and access_token parameters’ values cannot be empty.
Example request for obtaining a one-time password:
Copy
Full screen
Small screen
    curl -X POST "https://launcher.xsolla.com/otp" -H  "accept: application/json" -H  "Content-Type: application/json" -d "{  \"access_token\": \"string\",  \"refresh_token\": \"string\"}"
    

    Adding the one-time password to the installer’s name

    The received one-time password is a 36-character string in UUID format. Implement adding the one-time password to the installation file name when downloading in the following format: LauncherName_<OTP>.exe, where <OTP> is the one-time password.The received one-time password is a 36-character string in UUID format. To create a download link for the launcher installer through the data enrichment service, follow these steps:
    1. Obtain the download link for the launcher installer in Publisher Account.
    2. Modify the obtained link as follows:
      1. Replace the domain with dl.launcher.xsolla.com.
      2. Add the user’s one-time password to the link, as shown in the example below.

    Example of a launcher installer download link:

    https://dl.launcher.xsolla.com/xlauncher-builds/xsolla-launcher-update/<launcher_generation_id>/bin/web_installer.exe?otp=<your_generated_otp>, where <your_generated_otp> is the user’s one-time password.

    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.
    Last updated: April 19, 2024

    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!