Skip to content

Ubi Api

Laxis edited this page Aug 28, 2018 · 5 revisions

Ubi Siege API

notes:

  • user defined params are prefixed with an @
  • CSL means comma-seperated list

Authentication

every request to data endpoints has to content several headers:

  • content-type we always use "application/json; charset=UTF-8"
  • ubi-appid seems to be for logging on ubis end. We use 39baebad-39e5-4552-8c25-2c9b919064e2 (the same as ubi frontend)
  • authorization Ubi_v1 t=@ticket @ticket is the ticket returned when logging in (see below)

Logging in

Send a POST request to: https://uplayconnect.ubi.com/ubiservices/v2/profiles/sessions an authorization header should be set according to the Basic Auth scheme:

"Basic " + Base.encode64(@user + ":" + @pass)

on successful login the server will return with the following:

! remember to re-auth before the expiration time

{
    "token": "d/EavoH6jUOutYCld5atQQ==",
    "ticket": "..", // important !
    "twoFactorAuthenticationTicket": null,
    "expiration": "2018-01-24T21:15:53.9415212Z",
    "platformType": "uplay",
    "profileId": "1b50085a-8a20-4ce6-b75f-db6a00e4d718",
    "userId": "1b50085a-8a20-4ce6-b75f-db6a00e4d718",
    "username": "..",
    "nameOnPlatform": "LaxisB",
    "initializeUser": true,
    "spaceId": "632df4a5-4fd7-4ee5-a0c8-1f221f7e585f",
    "environment": "Prod",
    "hasAcceptedLegalOptins": true,
    "accountIssues": null,
    "sessionId": "1d07796b-1560-4f74-8658-fdf2a18c220a",
    "clientIp": "..",
    "serverTime": "2018-01-24T18:15:53.9885224Z",
    "rememberMeTicket":
        ".."
}

Data

get player by name

get level

get stats

get rank