Git Product home page Git Product logo

Comments (44)

Seems2Legit avatar Seems2Legit commented on June 12, 2024 1

Done.

from rainbow-six-siege-player-stats-api.

sidelux avatar sidelux commented on June 12, 2024 1

@SwiftCODA thanks, i'll check it.

from rainbow-six-siege-player-stats-api.

SwiftCODA avatar SwiftCODA commented on June 12, 2024 1

@BadCoder1337 @sidelux @Seems2Legit @danielwerg

Bounty has been raised to $1000 USD. Share this around with any devs or reverse engineers you know.

from rainbow-six-siege-player-stats-api.

redraskal avatar redraskal commented on June 12, 2024 1

@danielwerg My bad. I Don't believe there's any relation between the TabLive feature and the official Ubisoft stats tracker anyway. One thing I wanted to mention to everyone, @BadCoder1337 @sidelux @Seems2Legit is this endpoint:

profilesPreciseMatchmakingMatch: https://{env}public-ubiservices.ubi.com/{version}/profiles/{profileId}/matches/precise/matchstate

Based on my playing around with it, it looks to require the PUT method, instead of GET which makes me think maybe this is an endpoint that R6 uses to update the Ubisoft backend with match information while a player is playing. Maybe not though.

I believe the URL should look something like this: https://public-ubiservices.ubi.com/v1/profiles/{profileId}/matches/precise/matchstate?platform=uplay/psn/xbl https://public-ubiservices.ubi.com/v1/profiles/{profileId}/matches/precise/matchstate?platform=PC/PS4/XONE

The Host header is required for any JSON response. Method must be PUT otherwise you will get a 405 error.

With all that being said, here is the error I get:

{
    "moreInfo": "",
    "errorCode": 1,
    "httpCode": 400,
    "errorContext": "Shipyard.MMFrontEnd.Services",
    "message": "The body content is missing",
    "environment": "prod",
    "transactionTime": "2021-12-01T08:15:09.2371585Z",
    "transactionId": "fc2d8a4e-c964-49a5-8b9c-558351baef4e"
}

This route would only update match info so you wouldn't find any info by definition. PUT is to update a resource, meaning the match has already started and you want to update the status. My guess would be this route updates Ubisoft Connect presence info to show if a player is in a match and what round, even though that feature is incredibly broken. I doubt any route for updating match state would be allowed client-side.

from rainbow-six-siege-player-stats-api.

SwiftCODA avatar SwiftCODA commented on June 12, 2024 1

I noticed you can now connect Discord to your Ubisoft account. It asks to update activity, so I watched the console and network logs of discord. It seems like it gets updated through a Websocket. Maybe we can figure out something through this.
image

I've wondered if there are more websockets like this because this has been a feature on consoles, and maybe the PC Ubisoft Connect app too (not sure on that one), where you can see for example "MY_FRIEND - Ranked - Round 4".

I am heavily under the impression that there is not an HTTPS endpoint for this information, and I think the process of obtaining it is not as direct as we think it might be.

Unrelated, kinda - but read:
There is a guy who created a third-party Valorant API. Valorant has official endpoints that return all sorts of stats, but they use profileIds, not usernames–and there is no way to obtain a profileId FROM a username...
So what he did was run an instance (or more) of the Riot client on remote Windows machine and somehow linked it to his API code.
How it works:
A user requests stats from his API via a username. It then passes the username to the Riot client, makes a friend request, where for whatever reason, the profileId is then exposed. It immediately unfriends the user and returns the profileId back to the API, and then uses that to proceed.

What I'm saying, is I think we need to look at this more abstractly. Looking into websockets or strange friend request methods of obtaining this information, stuff along those lines.

from rainbow-six-siege-player-stats-api.

Seems2Legit avatar Seems2Legit commented on June 12, 2024

Do you got any URL to the api?

from rainbow-six-siege-player-stats-api.

Seems2Legit avatar Seems2Legit commented on June 12, 2024

(Btw. thank you very much for the readme :) 👍 🥇 )

from rainbow-six-siege-player-stats-api.

sidelux avatar sidelux commented on June 12, 2024

Uhm... apparently that endpoint not working anymore.
BUT! I have a final suggest for you, rank icons: https://pastebin.com/Y8ycfX3n ;)

from rainbow-six-siege-player-stats-api.

Seems2Legit avatar Seems2Legit commented on June 12, 2024

I can do that... to getUser.php right?

from rainbow-six-siege-player-stats-api.

sidelux avatar sidelux commented on June 12, 2024

Yep! After this i think there are all functions ;)

from rainbow-six-siege-player-stats-api.

Seems2Legit avatar Seems2Legit commented on June 12, 2024

Uhm... apparently that endpoint not working anymore.
BUT! I have a final suggest for you, rank icons: https://pastebin.com/Y8ycfX3n ;)

Hi @sidelux, do you still have the URL (even though it doesn't work)? Because I know something like this is possible, but I haven't found a way yet, so this might help...

from rainbow-six-siege-player-stats-api.

sidelux avatar sidelux commented on June 12, 2024

Can't rember and ubi website is changed too much...
Take a look here.

from rainbow-six-siege-player-stats-api.

SwiftCODA avatar SwiftCODA commented on June 12, 2024

Keep me posted if you figure this out, @Seems2Legit.

from rainbow-six-siege-player-stats-api.

SwiftCODA avatar SwiftCODA commented on June 12, 2024

@sidelux @Seems2Legit any help deciphering this would be great:

function x() {
            return (x = h()(i.a.mark(function e(t, n, r, a) {
                var o, s, c, u, l, d, f;
                return i.a.wrap(function(e) {
                    for (;;) switch (e.prev = e.next) {
                        case 0:
                            return o = r.appId, s = r.statsService, c = t.sessionId, u = t.ticket, l = t.expiration, d = "https://".concat(s, "/v1/current/summary/").concat(n), "r6s-stats-dev.ubisoft.com:443" === s && (d = "https://".concat(s, "/v1/current/summary/").concat(n)), "uplay" === (f = a.platform) ? f = "PC" : "psn" === f ? f = "PS4" : "xbl" === f && (f = "XONE"), e.abrupt("return", y()({
                                url: d,
                                method: "get",
                                params: {
                                    gameMode: a.gameMode,
                                    platform: f,
                                    startDate: a.startDate,
                                    endDate: a.endDate
                                },
                                headers: _(o, c, u, l)
                            }).then(function(e) {
                                return {
                                    response: e.data
                                }
                            }).catch(function(e) {
                                return Object(v.showErrors)("getPlayerSummary"), {
                                    error: e
                                }
                            }));
                        case 7:
                        case "end":
                            return e.stop()
                    }
                }, e)
            }))).apply(this, arguments)
        }

where u is Ubi_v1 t=LOGIN_TICKET_HERE
where o is any App ID, let's say 39baebad-39e5-4552-8c25-2c9b919064e2

Endpoints I've tried in Postman:
https://public-ubiservices.ubi.com/v1/current/summary/
https://r6s-stats-dev.ubisoft.com:443/v1/current/summary/
https://public-ubiservices.ubi.com/v1/current/summary/UBI_USER_ID_HERE
https://r6s-stats-dev.ubisoft.com:443/v1/current/summary/UBI_USER_ID_HERE

from rainbow-six-siege-player-stats-api.

SwiftCODA avatar SwiftCODA commented on June 12, 2024

@sidelux @Seems2Legit Hey guys. I did some network request scraping on the Siege app for Windows and went through the Ubisoft Connect side menu thing to make more requests and I analyzed most of them and found one of them returned this beautiful JSON containing a list of endpoints with a brief title for each one. Maybe you guys can try messing with some of them in Postman or something and seeing if any return current match info. I've played around with it a bit with someone else so let me know if you find anything or have any questions.

{
   "parameters":{
      "us-sdkClientRemoteLogsGame":{
         "fields":{
            "navigation":"None",
            "relationshipUpdate":"None",
            "playerNotifications":"None",
            "friendRecommendations":"None",
            "friends":"None",
            "url":"",
            "maxTextLength":32768,
            "uncategorized":"None"
         },
         "relatedPopulation":{
            "name":"AllLogsDisabled",
            "subject":"EndUserLogging"
         }
      },
      "us-sdkClientUrls":{
         "fields":{
            "allConnections":"https://{env}public-ubiservices.ubi.com/{version}/profiles/connections",
            "allProfilesApplications":"https://msr-{env}public-ubiservices.ubi.com/{version}/profiles/applications",
            "allProfilesEntities":"https://{env}public-ubiservices.ubi.com/{version}/profiles/entities",
            "allProfilesStats":"https://{env}public-ubiservices.ubi.com/{version}/profiles/stats",
            "allSpacesEntities":"https://{env}public-ubiservices.ubi.com/{version}/spaces/entities",
            "allSpacesItems":"https://{env}public-ubiservices.ubi.com/{version}/spaces/items",
            "allSpacesOffers":"https://{env}public-ubiservices.ubi.com/{version}/spaces/offers",
            "applications":"https://{env}public-ubiservices.ubi.com/{version}/applications/{applicationId}/configuration",
            "applicationsMetadata":"https://{env}public-ubiservices.ubi.com/{version}/applications",
            "applicationsParameters":"https://{env}public-ubiservices.ubi.com/{version}/applications/{applicationId}/parameters",
            "blocklist":"https://{env}public-ubiservices.ubi.com/{version}/profiles/{profileId}/blocks",
            "blocklistBlockedBy":"https://{env}public-ubiservices.ubi.com/{version}/profiles/{profileId}/blocks/blockedBy",
            "blocklistUnblock":"https://{env}public-ubiservices.ubi.com/{version}/profiles/{profileId}/blocks/{blockedProfileId}",
            "challenge":"https://{env}public-ubiservices.ubi.com/{version}/spaces/{spaceId}/challenges",
            "challengeProgression":"https://{env}public-ubiservices.ubi.com/{version}/profiles/{profileId}/challenges/progressions",
            "configsEvents":"https://{env}public-ubiservices.ubi.com/{version}/spaces/{spaceId}/configs/events",
            "connections":"https://{env}public-ubiservices.ubi.com/{version}/profiles/{profileId}/connections",
            "events":"https://{env}public-ubiservices.ubi.com/{version}/profiles/{profileId}/events",
            "eventsDefinitions":"https://{env}public-ubiservices.ubi.com/{version}/spaces/{spaceId}/eventsDefinitions",
            "friends":"https://msr-{env}public-ubiservices.ubi.com/{version}/profiles/me/friends",
            "gamesPlayed":"https://{env}public-ubiservices.ubi.com/{version}/profiles/{profileId}/gamesplayed",
            "localization":"https://{env}public-ubiservices.ubi.com/{version}/spaces/{spaceId}/localizations/strings",
            "localizationAll":"https://{env}public-ubiservices.ubi.com/{version}/spaces/{spaceId}/localizations/strings/all",
            "moderation":"https://{env}public-ubiservices.ubi.com/{version}/spaces/{spaceId}/moderation/{text}",
            "moderationPOST":"https://{env}public-ubiservices.ubi.com/{version}/spaces/{spaceId}/moderation",
            "news":"https://msr-{env}public-ubiservices.ubi.com/{version}/profiles/me/news",
            "personaProfile":"https://{env}public-ubiservices.ubi.com/{version}/profiles/{profileId}/persona",
            "personaSpace":"https://{env}public-ubiservices.ubi.com/{version}/profiles/persona",
            "policies":"https://{env}public-ubiservices.ubi.com/{version}/policies",
            "playerReportsProfile":"https://{env}public-ubiservices.ubi.com/{version}/profiles/{profileId}/reports",
            "playerReportsSpaceCategories":"https://{env}public-ubiservices.ubi.com/{version}/spaces/{spaceId}/configs/reports/categories",
            "profiles":"https://{env}public-ubiservices.ubi.com/{version}/profiles",
            "profilesActions":"https://msr-{env}public-ubiservices.ubi.com/{version}/profiles/{profileId}/club/actions",
            "profilesApplications":"https://msr-{env}public-ubiservices.ubi.com/{version}/profiles/me/applications",
            "profilesChallenges":"https://msr-{env}public-ubiservices.ubi.com/{version}/profiles/me/club/challenges",
            "profilesEntities":"https://{env}public-ubiservices.ubi.com/{version}/profiles/{profileId}/entities",
            "profilesExternal":"https://{env}public-ubiservices.ubi.com/{version}/profiles/external",
            "profilesInventory":"https://{env}public-ubiservices.ubi.com/{version}/profiles/{profileId}/inventory",
            "profilesInventoryExpiredDetails":"https://{env}public-ubiservices.ubi.com/{version}/profiles/{profileId}/inventory/expiredDetails",
            "profilesInventoryInstances":"https://{env}public-ubiservices.ubi.com/{version}/profiles/{profileId}/inventory/instances",
            "profilesInventoryInstancesTransactions":"https://{env}public-ubiservices.ubi.com/{version}/profiles/{profileId}/inventory/instances/transactions",
            "profilesInventoryPrimarystore":"https://{env}public-ubiservices.ubi.com/{version}/profiles/{profileId}/inventory/primarystore",
            "profilesInventoryTransactions":"https://{env}public-ubiservices.ubi.com/{version}/profiles/{profileId}/inventory/transactions",
            "profilesLeaderboard":"https://{env}public-ubiservices.ubi.com/{version}/profiles/ranks",
            "profilesMeBattlepassesSeasons":"https://{env}public-ubiservices.ubi.com/{version}/profiles/me/battlepasses/seasons",
            "profilesMeBattlepassesSeasonsSeasonId":"https://{env}public-ubiservices.ubi.com/{version}/profiles/me/battlepasses/seasons/{seasonId}",
            "profilesMeCommunityChallenges":"https://msr-{env}public-ubiservices.ubi.com/{version}/profiles/me/club/communityChallenges",
            "profilesMeEvents":"https://{env}public-ubiservices.ubi.com/{version}/profiles/me/events",
            "profilesMeInventoryPrimarystore":"https://{env}public-ubiservices.ubi.com/{version}/profiles/me/inventory/primarystore",
            "profilesMeLeaderboard":"https://{env}public-ubiservices.ubi.com/{version}/profiles/me/ranks",
            "profilesMeRoamingProfiles":"{baseurl_msr}/{version}/users/me/roamingProfiles",
            "profilesNotifications":"https://{env}public-ubiservices.ubi.com/{version}/profiles/{profileId}/notifications",
            "profilesNotificationsBatch":"https://{env}public-ubiservices.ubi.com/{version}/profiles/notifications",
            "profilesProfileChallenges":"https://msr-{env}public-ubiservices.ubi.com/{version}/profiles/me/club/playerchallenges",
            "profilesPreciseMatchmakingClient":"https://{env}public-ubiservices.ubi.com/{version}/profiles/{profileId}/matches/precise/clientstate",
            "profilesPreciseMatchmakingMatch":"https://{env}public-ubiservices.ubi.com/{version}/profiles/{profileId}/matches/precise/matchstate",
            "profilesRewards":"https://msr-{env}public-ubiservices.ubi.com/{version}/profiles/{profileId}/club/rewards",
            "profilesSeasonChallenges":"https://msr-{env}public-ubiservices.ubi.com/{version}/profiles/{profileId}/club/seasonchallenges?spaceId={spaceId}",
            "profilesStats":"https://{env}public-ubiservices.ubi.com/{version}/profiles/{profileId}/stats",
            "profilesStatsCard":"https://{env}public-ubiservices.ubi.com/{version}/profiles/statscard",
            "profilesUgcPhotos":"https://{env}public-ubiservices.ubi.com/{version}/profiles/ugc/photos",
            "profilesUgcPhotosOwn":"https://{env}public-ubiservices.ubi.com/{version}/profiles/{profileId}/ugc/photos",
            "profilesUgcViews":"https://{env}public-ubiservices.ubi.com/{version}/profiles/ugc/{contentId}/views",
            "profilesUgcFavorites":"https://{env}public-ubiservices.ubi.com/{version}/profiles/{profileId}/ugc/favorites",
            "profilesUgcRatings":"https://{env}public-ubiservices.ubi.com/{version}/profiles/{profileId}/ugc/ratings",
            "profilesUgcExternalVideos":"https://{env}public-ubiservices.ubi.com/{version}/profiles/ugc/externalvideos",
            "profilesUgcUpdateFavorite":"https://{env}public-ubiservices.ubi.com/{version}/profiles/{profileId}/ugc/{contentId}/favorites",
            "profilesUgcUpdateRating":"https://{env}public-ubiservices.ubi.com/{version}/profiles/{profileId}/ugc/{contentId}/ratings",
            "recommendations":"https://{env}public-ubiservices.ubi.com/{version}/profiles/{profileId}/recommendations",
            "remoteLogs":"https://{env}public-ubiservices.ubi.com/{version}/profiles/me/remotelog",
            "sandboxes":"https://msr-{env}public-ubiservices.ubi.com/{version}/spaces/{spaceId}/sandboxes",
            "secondaryStoreInventoryRulesExecution":"https://{env}public-ubiservices.ubi.com/{version}/profiles/{profileId}/inventory/rulesexecution",
            "spacesActions":"https://msr-{env}public-ubiservices.ubi.com/{version}/spaces/{spaceId}/actions",
            "spacesBattlepasses":"https://{env}public-ubiservices.ubi.com/{version}/spaces/{spaceId}/battlepasses",
            "spacesBattlepassesSeasons":"https://{env}public-ubiservices.ubi.com/{version}/spaces/{spaceId}/battlepasses/seasons",
            "spacesBattlepassesSeasonsSeasonId":"https://{env}public-ubiservices.ubi.com/{version}/spaces/{spaceId}/battlepasses/seasons/{seasonId}",
            "spacesChallengepools":"https://msr-{env}public-ubiservices.ubi.com/{version}/spaces/{spaceId}/club/challengepools",
            "spacesChallenges":"https://msr-{env}public-ubiservices.ubi.com/{version}/spaces/{spaceId}/club/challenges",
            "spacesCommunityChallenges":"https://msr-{env}public-ubiservices.ubi.com/{version}/spaces/{spaceId}/club/communityChallenges",
            "spacesConfigsPrimarystore":"https://{env}public-ubiservices.ubi.com/{version}/spaces/{spaceId}/configs/primarystore",
            "spacesConfigsSsiAttributes":"https://{env}public-ubiservices.ubi.com/{version}/spaces/{spaceId}/configs/secondarystore/instances/attributes",
            "spacesConfigsSsiListsOfAttributes":"https://{env}public-ubiservices.ubi.com/{version}/spaces/{spaceId}/configs/secondarystore/instances/listsOfAttributes",
            "spacesConfigsSsiRules":"https://{env}public-ubiservices.ubi.com/{version}/spaces/{spaceId}/configs/secondarystore/instances/rules",
            "spacesConfigsUgc":"https://{env}public-ubiservices.ubi.com/{version}/spaces/{spaceId}/configs/ugc",
            "spacesEntities":"https://{env}public-ubiservices.ubi.com/{version}/spaces/{spaceId}/entities",
            "spacesItems":"https://{env}public-ubiservices.ubi.com/{version}/spaces/{spaceId}/items",
            "spacesLeaderboard":"https://{env}public-ubiservices.ubi.com/{version}/spaces/{spaceId}/leaderboards",
            "spacesNews":"https://msr-{env}public-ubiservices.ubi.com/{version}/spaces/news",
            "spacesOffers":"https://{env}public-ubiservices.ubi.com/{version}/spaces/{spaceId}/offers",
            "spacesParameters":"https://{env}public-ubiservices.ubi.com/{version}/spaces/{spaceId}/parameters",
            "spacesRewards":"https://msr-{env}public-ubiservices.ubi.com/{version}/spaces/{spaceId}/rewards",
            "spacesSeasonChallenges":"https://msr-{env}public-ubiservices.ubi.com/{version}/spaces/{spaceId}/club/seasonchallenges",
            "spacesStats":"https://{env}public-ubiservices.ubi.com/{version}/spaces/{spaceId}/communitystats",
            "spacesStatsCard":"https://{env}public-ubiservices.ubi.com/{version}/spaces/{spaceId}/communitystatscard",
            "sessions":"https://{env}public-ubiservices.ubi.com/{version}/profiles/sessions",
            "telemetry":"https://receiver.telemetry-test.tgdp.ubisoft.org/telemetry",
            "users":"https://{env}public-ubiservices.ubi.com/{version}/users",
            "usersMeOnlineStatuses":"https://{env}public-ubiservices.ubi.com/{version}/users/me/onlineStatuses",
            "usersMeOnlineStatusesManualStatus":"https://{env}public-ubiservices.ubi.com/{version}/users/me/onlineStatuses/manualStatus",
            "usersOnlineStatuses":"https://{env}public-ubiservices.ubi.com/{version}/users/onlineStatuses",
            "tLog":"https://tglog.datamore.qq.com/{appId}/report/",
            "voicechatTokenVivox":"https://{env}public-ubiservices.ubi.com/{version}/profiles/{profileId}/voicechattoken/vivox",
            "voicechatConfigVivox":"https://{env}public-ubiservices.ubi.com/{version}/spaces/{spaceId}/configs/voicechat/vivox",
            "websocketNotifications":"wss://{env}public-ws-ubiservices.ubi.com/{version}/websocket",
            "websocketServer":"wss://{env}public-ws-ubiservices.ubi.com",
            "profilesFriends":"https://msr-{env}public-ubiservices.ubi.com/{version}/profiles/{profileId}/friends",
            "calendar":"https://{env}public-ubiservices.ubi.com/{version}/spaces/{spaceId}/calendarentries",
            "profilesUgcReportContent":"https://{env}public-ubiservices.ubi.com/{version}/profiles/{profileId}/ugc/{contentId}/reports",
            "profilesUgcRequestReportedContent":"https://{env}public-ubiservices.ubi.com/{version}/profiles/{profileId}/ugc/reports"
         },
         "relatedPopulation":null
      }
   }
}

from rainbow-six-siege-player-stats-api.

SwiftCODA avatar SwiftCODA commented on June 12, 2024

@sidelux Have you looked into any of those endpoints or come across any new leads?

from rainbow-six-siege-player-stats-api.

sidelux avatar sidelux commented on June 12, 2024

Not yet i'm sorry, i will check it asap.

from rainbow-six-siege-player-stats-api.

SwiftCODA avatar SwiftCODA commented on June 12, 2024

@sidelux @Seems2Legit. Someone found this thread and contacted me in an effort to help us figure it out. During that time, we discovered Map Stats. I also noticed that Ubisoft doesn't keep date-based information past July 31st (121 days before now). Through these discoveries, I've learned a bit more about Ubisoft's APIs. In one of my previous comments here, I showed a somewhat legible JavaScript API Request function. Here's what I know about it.

Method: GET
URL: https://r6s-stats-dev.ubisoft.com or https://public-ubiservices.ubi.com
Page: /v1/current/summary/{PROFILE_ID}

Parameters:
gameMode: pvp
platform: PC or PS4 or XONE
startDate: 20151126
endDate: 20211129 (today in YYYYMMDD)

Headers:
Ubi-AppId: 39baebad-39e5-4552-8c25-2c9b919064e2
Ubi-SessionId: YOUR_LOGIN_SESSION_ID
Expiration: YOUR_LOGIN_EXPIRATION
Authorization: Ubi_v1 t=YOUR_LOGIN_TICKET

I suggest using these headers in every request you try to examine. As for the parameters, those are common ones. If the URL does not directly require the userId, add the profileId as a parameter: profileIds= or populations= or profile_ids=

I believe the spaceId or spaceIds parameters are requiring the UUID for Rainbow. I have a value saved. It is either Rainbow for PS4 or Rainbow for PC, don't remember, sorry. 632df4a5-4fd7-4ee5-a0c8-1f221f7e585f
Screen Shot 2021-11-29 at 5 48 04 PM

Any of the endpoints in the list I previously sent that contain me in the title will not require any userId, profileId parameters, and instead require that the Authorization Token is that of the user in question. If the current match info endpoint we find ends up having a me in the title, the user will have to login with their own Ubisoft account.

If you guys have any connections with people that could help with this, I ask that you reach out to them. To be honest, I would pay good money for someone to find the endpoint and how it works.

Good luck.

from rainbow-six-siege-player-stats-api.

BadCoder1337 avatar BadCoder1337 commented on June 12, 2024

I don't remember which thing came first TabLive or Official tracker update. But I assume the current match info might obtained through GraphQL API that harder to reverse-engeneer.

I've unraveled some endpoints (eg. inventory, chat), which had an official use, but I have no clue where ever to search the current match info endpoint. This info doesn't reveal explicitly to the user.

from rainbow-six-siege-player-stats-api.

SwiftCODA avatar SwiftCODA commented on June 12, 2024

@BadCoder1337 I'm pretty sure TabLive has been out for quite a while and the official Ubisoft stats tracker web page has been out for only a few months. I'm not familiar with GraphQL APIs but I think it would be weird for all of their endpoints to use the traditional method and have a couple using GraphQL. If that is the case, hopefully we can get yourself and anyone else you might know to help with it.

I have also unraveled some endpoints and have shared a few comments up in a JSON file. Each has a brief description of its purpose and the endpoint format. Problem is we can't see what parameters or headers are needed.

I noticed with TabLive that you have to 'link' your PSN, Xbox, Uplay accounts to see your in-game stats. So I'm wondering if there is 'current match information' for your PSN profile for example through Sony API. The way they get you to link it is weird to me because all you have to do is type your PSN username, but if you type a username that isn't yours, it won't work. So I don't understand how they're verifying your ownership of a PSN account.

from rainbow-six-siege-player-stats-api.

SwiftCODA avatar SwiftCODA commented on June 12, 2024

@BadCoder1337 Could you share some of the endpoints that you've found?

from rainbow-six-siege-player-stats-api.

danielwerg avatar danielwerg commented on June 12, 2024

official Ubisoft stats tracker web page has been out for only a few months

Over a year

ref: danielwerg/r6api.js#42

from rainbow-six-siege-player-stats-api.

SwiftCODA avatar SwiftCODA commented on June 12, 2024

@danielwerg My bad. I Don't believe there's any relation between the TabLive feature and the official Ubisoft stats tracker anyway. One thing I wanted to mention to everyone, @BadCoder1337 @sidelux @Seems2Legit is this endpoint:

profilesPreciseMatchmakingMatch:
https://{env}public-ubiservices.ubi.com/{version}/profiles/{profileId}/matches/precise/matchstate

Based on my playing around with it, it looks to require the PUT method, instead of GET which makes me think maybe this is an endpoint that R6 uses to update the Ubisoft backend with match information while a player is playing. Maybe not though.

I believe the URL should look something like this:
https://public-ubiservices.ubi.com/v1/profiles/{profileId}/matches/precise/matchstate?platform=uplay/psn/xbl
https://public-ubiservices.ubi.com/v1/profiles/{profileId}/matches/precise/matchstate?platform=PC/PS4/XONE

The Host header is required for any JSON response. Method must be PUT otherwise you will get a 405 error.

With all that being said, here is the error I get:

{
    "moreInfo": "",
    "errorCode": 1,
    "httpCode": 400,
    "errorContext": "Shipyard.MMFrontEnd.Services",
    "message": "The body content is missing",
    "environment": "prod",
    "transactionTime": "2021-12-01T08:15:09.2371585Z",
    "transactionId": "fc2d8a4e-c964-49a5-8b9c-558351baef4e"
}

from rainbow-six-siege-player-stats-api.

BadCoder1337 avatar BadCoder1337 commented on June 12, 2024

@BadCoder1337 Could you share some of the endpoints that you've found?

Ubisoft closed all inventory endpoints I discovered a year ago. Chat endpoint allows to send messages to any user ignoring friend list. In the wrong hands it could be easily abused and it will be shut down by Ubisoft.

Also I inspected official tracker again. GraphQL used for CMS purposes, so forget about it.

from rainbow-six-siege-player-stats-api.

SwiftCODA avatar SwiftCODA commented on June 12, 2024

@BadCoder1337 The list above that I found was sniffed through the Postman proxy while messing around with the Ubisoft Connect side menu in Siege for macOS. Maybe we can try analyzing requests made from Siege again, instead of just their webpage for stats.

from rainbow-six-siege-player-stats-api.

BadCoder1337 avatar BadCoder1337 commented on June 12, 2024

@SwiftCODA It's easier to say than to do. The game and Ubisoft Connect use SSL pinning and do not lend themselves to my tools. For example, we can't unravel the WebSocket API.

from rainbow-six-siege-player-stats-api.

SwiftCODA avatar SwiftCODA commented on June 12, 2024

@BadCoder1337 What you said slightly goes beyond my scope of knowledge. I have used Postman, and their proxy to analyze network requests from Rainbow Six Siege in the past, which is where I found that big JSON file I posted earlier. Maybe what you're referring to cannot be done through my method though. If you know anyone with more expertise than us, you should get them to work on this. I will pay for someone to find this feature.

from rainbow-six-siege-player-stats-api.

SwiftCODA avatar SwiftCODA commented on June 12, 2024

@BadCoder1337 @sidelux @Seems2Legit @danielwerg I'm setting a $200 USD bounty on this. Anyone who finds the solution will get that through PayPal.

from rainbow-six-siege-player-stats-api.

SwiftCODA avatar SwiftCODA commented on June 12, 2024

I just noticed that on the bottom of the scoreboard in-game, there is a match ID. I expect we can make some request using this... Just a matter of finding the endpoint and how to get the match ID from a username.

from rainbow-six-siege-player-stats-api.

SwiftCODA avatar SwiftCODA commented on June 12, 2024

Hey guys.

I did some more digging last night and my conclusion with the desktop app is that the only requests I'm able to analyze are HTTPS and handshakes for WebSockets, but not the WebSockets themselves. Reaching this dead end has led me to realize that TabLive most likely is not using Ubisoft's WebSocket API since it is supposed to be a two-way data transfer without interception possibilities.

To my recent understanding, once an HTTPS connection is upgraded to WebSocket, public keys are exchanged, like SSL, and it's essentially impossible to mimic either party afterwards. So if there is a WebSocket connection between Ubisoft's servers and the desktop app, while playing a match, that connection wouldn't benefit us in any way really.

I've been seeing a lot about spaceIds in some HTTPS requests I analyzed. I think sometimes it can mean the edition of the game, like PC, Xbox, PlayStation; or a certain branch in their database for different things, like friends of a user.

I've really been trying to work with the profilesPreciseMatchmakingMatch endpoint, the problem is that it requires a PUT method.
Endpoint Example: https://public-ubiservices.ubi.com/v1/profiles/16a84bdb-8684-43c5-9459-c9ea88a56e9e/matches/precise/matchstate?platform=XONE
Method: PUT
Headers:

  • Authorization: Ubi_v1 t={YOUR_TICKET}
  • Ubi-AppId: 39baebad-39e5-4552-8c25-2c9b919064e2
  • Host: public-ubiservices.ubi.com
    Body (JSON) Keep in mind this is not successful, only what I've tried:
{
    "spaceId":"632df4a5-4fd7-4ee5-a0c8-1f221f7e585f",
    "Match":"01b4ba97-654e-4eb3-8211-85b1c628658a"
}

Response:

{
    "moreInfo": "",
    "errorCode": 1000,
    "httpCode": 400,
    "errorContext": "Shipyard.MMFrontEnd.Services",
    "message": "Request Body has invalid field(s): Error converting value \"01b4ba97-654e-4eb3-8211-85b1c628658a\" to type 'Shipyard.MMCoreLibrary.Library.Resources.GameState.Entities.GameStateRequestEntity'. Path 'Match', line 3, position 50.",
    "environment": "prod",
    "transactionTime": "2022-04-25T05:06:49.3530193Z",
    "transactionId": "69fe6057-e8c2-4da8-9da9-b331d69c5b6e"
}

So I think the next step would be to find some UUID labeled GameStateRequestEntity.

Let me know what you guys think @BadCoder1337 @sidelux @Seems2Legit @danielwerg

from rainbow-six-siege-player-stats-api.

BadCoder1337 avatar BadCoder1337 commented on June 12, 2024

@SwiftCODA obviuosly, match should be a some structure.
I tried following body:

{
    "spaceId":"632df4a5-4fd7-4ee5-a0c8-1f221f7e585f",
    "match":{
        "id": "01b4ba97-654e-4eb3-8211-85b1c628658a"
    }
}

Then I got the response:

{
    "moreInfo": "",
    "errorCode": 1013,
    "httpCode": 403,
    "errorContext": "Shipyard.MMFrontEnd.Services",
    "message": "The ticket application id is not the same as the header application id.",
    "environment": "prod",
    "transactionTime": "2022-04-26T09:52:23.3337302Z",
    "transactionId": "e381ddd4-b397-41cf-9576-865c1973a889"
}

I will try to get a proper auth ticket later.

from rainbow-six-siege-player-stats-api.

SwiftCODA avatar SwiftCODA commented on June 12, 2024

@BadCoder1337 With a valid app id and ticket:

{
    "moreInfo": "",
    "errorCode": 1000,
    "httpCode": 400,
    "errorContext": "Shipyard.MMFrontEnd.Services",
    "message": "Validation failed: \n -- IdempotencyId: idempotencyId is invalid or empty\n -- Match.GameMode: 'Game Mode' must not be empty.\n -- Match.MatchDetails: 'Match Details' must not be empty.\n -- Match.MatchDetails: 'Match Details' must not be empty.\n -- Match.Status: Invalid matchDetails.status value received. (only 'Fill' or 'Drain' are allowed as value)",
    "environment": "prod",
    "transactionTime": "2022-04-26T15:29:49.6702061Z",
    "transactionId": "dfbd2637-b171-4006-b28c-e5c34b91347e"
}

from rainbow-six-siege-player-stats-api.

Digneety avatar Digneety commented on June 12, 2024

I noticed you can now connect Discord to your Ubisoft account. It asks to update activity, so I watched the console and network logs of discord. It seems like it gets updated through a Websocket. Maybe we can figure out something through this.
image

from rainbow-six-siege-player-stats-api.

xorth avatar xorth commented on June 12, 2024

A discord websocket or a ubi websocket?

from rainbow-six-siege-player-stats-api.

Digneety avatar Digneety commented on June 12, 2024

Discord websocket

from rainbow-six-siege-player-stats-api.

Digneety avatar Digneety commented on June 12, 2024

I noticed you can now connect Discord to your Ubisoft account. It asks to update activity, so I watched the console and network logs of discord. It seems like it gets updated through a Websocket. Maybe we can figure out something through this.
image

I've wondered if there are more websockets like this because this has been a feature on consoles, and maybe the PC Ubisoft Connect app too (not sure on that one), where you can see for example "MY_FRIEND - Ranked - Round 4".

I am heavily under the impression that there is not an HTTPS endpoint for this information, and I think the process of obtaining it is not as direct as we think it might be.

Unrelated, kinda - but read: There is a guy who created a third-party Valorant API. Valorant has official endpoints that return all sorts of stats, but they use profileIds, not usernames–and there is no way to obtain a profileId FROM a username... So what he did was run an instance (or more) of the Riot client on remote Windows machine and somehow linked it to his API code. How it works: A user requests stats from his API via a username. It then passes the username to the Riot client, makes a friend request, where for whatever reason, the profileId is then exposed. It immediately unfriends the user and returns the profileId back to the API, and then uses that to proceed.

What I'm saying, is I think we need to look at this more abstractly. Looking into websockets or strange friend request methods of obtaining this information, stuff along those lines.

That's what I thought so I searched trough the Overwolf Overlay but even there the WebSocket is dead. There are some Http Request which are POST requests but nothing of value.

from rainbow-six-siege-player-stats-api.

Digneety avatar Digneety commented on June 12, 2024

So after deleting my earlier Post because I thought it was in the wrong place thanks to @SwiftCODA I decided to repost it because it might be helpful.

There is a narratives endpoint which shows you a recap of a match where you or a player performed very well. In the Response there are Informations like: Match-Id, Opponents, Teammates, match duration and the date when the match was played. So maybe there might be some more to this.
image

from rainbow-six-siege-player-stats-api.

SwiftCODA avatar SwiftCODA commented on June 12, 2024

Anyone familiar with the "groups from profileId" endpoint?
public-ubiservices.ubi.com/v1/profiles/{{PROFILE_ID}}/groups?{{SOME_PARAMETERS}}

Headers are:
Authorization: Ubi_v1 t={{MY_TOKEN}}
Ubi-AppId: {{MY_APP_ID}}
Ubi-SessionId: {{MY_SESSION_ID}}

Unsure of what the parameters are...
Screenshot 2023-05-08 at 12 46 49 PM
Screenshot 2023-05-08 at 12 46 59 PM

from rainbow-six-siege-player-stats-api.

Digneety avatar Digneety commented on June 12, 2024

So if you enter the parameters ?spaceId=0d2ae42d-4c27-4cb7-af6c-2099062302bb&groupTypeId=5c7dc274-10fc-4ce1-8342-455882d7a7cc you should get a response like this:
image

from rainbow-six-siege-player-stats-api.

zozo1237 avatar zozo1237 commented on June 12, 2024

Also I inspected official tracker again. GraphQL used for CMS purposes, so forget about it.

Heads up for anyone still following this issue, there are (at least) two GraphQL endpoints:

  • The first is available at cms-cache.ubisoft.com is a Contentful CMS API and doesn't appear to be relevant here.
  • The other is available through the UbiServices Gateway at any UBI AWS endpoint (Ex. public-ubiservices.ubi.com) it can be accessed via POST /v1/profiles/me/uplay/graphql

The UbiServices endpoint seems to be running Apollo Server. Unfortunately introspection queries are disabled so we can't see the schema.

from rainbow-six-siege-player-stats-api.

zozo1237 avatar zozo1237 commented on June 12, 2024

For future reference:

  • The API at public-ubiservices.ubi.com seems to be a no go with no relevant endpoints. Party management is done though this API, but matchmaking doesn't seem to be.
  • The relevant GraphQL API at /v1/profiles/me/uplay/graphql is also a no go - blind introspection revealed no relevant fields.
  • The WebSocket API at public-ws-ubiservices.ubi.com/v2/websocket isn't relevant either - none of the NotificationTypes I found relate to matchmaking.

All of the above seem to:
A: Have a lot of overlap with each other (You can get party management information from all of them) and,
B: Have a lot do do with the Ubisoft Connect Client

This leads me to the conclusion that matchmaking is done by a different server, likely one specific to R6. But because of the certificate pinning done by the R6 client I am unable to inspect the web traffic sent.

An cursory analysis of traffic sent from the client is as follows:

  • Connections to localhost on 1987, 2060, 2006, and 2001
  • Connections to many servers on 443
  • Connections to many, many servers on 3075
  • Other connections on 2012, 2015, and 2033

from rainbow-six-siege-player-stats-api.

hiibolt avatar hiibolt commented on June 12, 2024

@SwiftCODA Have you considered monitoring what Overwolf uses to keep tabs on current match?

I've written custom overlays for Overwolf, and it provides a ton of current match data. It's possible it doesn't directly read game data (otherwise, there'd probably be a lot of cheats patching Overwolf), and instead monitors some Ubisoft wss.

from rainbow-six-siege-player-stats-api.

SwiftCODA avatar SwiftCODA commented on June 12, 2024

@hiibolt Hey! No I haven't looked into it. I actually haven't touched much regarding this issue in a while because of trying to keep up with Ubi's new stats endpoints which are all over the place and have ridiculous rate limits. Fetching stats on a commercial level is not near is trivial as it used to be.

from rainbow-six-siege-player-stats-api.

hiibolt avatar hiibolt commented on June 12, 2024

@hiibolt Hey! No I haven't looked into it. I actually haven't touched much regarding this issue in a while because of trying to keep up with Ubi's new stats endpoints which are all over the place and have ridiculous rate limits. Fetching stats on a commercial level is not near is trivial as it used to be.

No kidding, never thought we'd have to implement a proxy and account rotator just to view some public numbers...

If you're still looking for endpoints, you can query the parameters with /v1/spaces/<spaceID>/parameters which displays a decent chunk of the usable endpoints and websockets.

from rainbow-six-siege-player-stats-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.