Seems2Legit / Rainbow-Six-Siege-Player-Stats-API

PHP API which allows you to search players and get their R6 stats
Other
99 stars 32 forks source link

GET Rank API call gives 404 error #65

Closed steelx closed 4 years ago

steelx commented 4 years ago

Upon making this GET request with all below headers:

66fcdb38-e7c2-45dd-a1c4-acbd7086d00f spaceId is after basic auth Session call, which is owner here. profile_ids is the otherProfile profileId. Am I do it correct ?

https://public-ubiservices.ubi.com/v1/spaces/66fcdb38-e7c2-45dd-a1c4-acbd7086d00f/sandboxes/OSBOR_PC_LNCH_A/r6karma/players?board_id=pvp_ranked&season_id=-1&profile_ids=b5072e90-ad85-4bd8-9d18-e0bfe5f2aba5,&region_id=apac

I get following error:

{
    "errorCode": 1003,
    "message": "Resource 'https://public-ubiservices.ubi.com/v1/spaces/66fcdb38-e7c2-45dd-a1c4-acbd7086d00f/sandboxes/OSBOR_PC_LNCH_A/r6karma/players' not found.",
    "httpCode": 404,
    "errorContext": "UbiServices.Gateway",
    "moreInfo": "A link to more information will be coming soon. Please contact UbiServices for more support.",
    "transactionTime": "2020-08-26T11:19:57Z",
    "transactionId": "17724d77-2a2b-4da0-8cf3-aa2365b3683b"
}
Seems2Legit commented 4 years ago

Hello @steelx, to my knowledge you shouldn't modify the spaceId. It's a id given my ubisoft for that specific endpoint or what not.

Just leave it as it is:

$urls = [ "uplay" => "https://public-ubiservices.ubi.com/v1/spaces/5172a557-50b5-4665-b7db-e3f2e8c5041d/sandboxes/OSBOR_PC_LNCH_A/r6karma/players", "xbl" => "https://public-ubiservices.ubi.com/v1/spaces/98a601e5-ca91-4440-b1c5-753f601a2c90/sandboxes/OSBOR_XBOXONE_LNCH_A/r6karma/players", "psn" => "https://public-ubiservices.ubi.com/v1/spaces/05bfb3f7-6c21-4c42-be1f-97a33fb5cf66/sandboxes/OSBOR_PS4_LNCH_A/r6karma/players" ];

steelx commented 4 years ago

@Seems2Legit thanks for responding. I updated my GET call with passing all HEADER e,g, 'authorization, ubi0appid, Referer' GET CALL TO -> https://public-ubiservices.ubi.com/v1/spaces/5172a557-50b5-4665-b7db-e3f2e8c5041d/sandboxes/OSBOR_PC_LNCH_A/r6karma/players?board_id=pvp_ranked&season_id=-1&profile_ids=b5072e90-ad85-4bd8-9d18-e0bfe5f2aba5&region_id=apac

I get following ERROR now

{
    "serverUtcTime": "2020-08-26 12:11:00",
    "resource": "/public/r6karma/v1/players",
    "httpCode": 401,
    "errorCode": "RendezVous::124",
    "message": "Stripped in prod",
    "moreInfo": ""
}

Above call for test I made in Postman

image

sidelux commented 4 years ago

I tried with postman like you and it works:

Url: https://public-ubiservices.ubi.com/v1/spaces/5172a557-50b5-4665-b7db-e3f2e8c5041d/sandboxes/OSBOR_PC_LNCH_A/r6karma/players?board_id=pvp_ranked&profile_ids=c3f8ab6a-db16-414e-9c24-bcaad74ee143&region_id=euw&season_id=-1

Header:

Content-Type:application/json
Ubi-AppId:39baebad-39e5-4552-8c25-2c9b919064e2
Authorization:Ubi_v1 t=ACCESS_TOKEN

Params:

board_id:pvp_ranked
profile_ids:c3f8ab6a-db16-414e-9c24-bcaad74ee143
region_id:euw
season_id:-1

With result:

{
    "players": {
        "c3f8ab6a-db16-414e-9c24-bcaad74ee143": {
            "max_mmr": 0.0,
            "skill_mean": 25.0,
            "deaths": 0,
            "profile_id": "c3f8ab6a-db16-414e-9c24-bcaad74ee143",
            "next_rank_mmr": 0.0,
            "rank": 0,
            "max_rank": 0,
            "board_id": "pvp_ranked",
            "skill_stdev": 8.334,
            "kills": 0,
            "last_match_skill_stdev_change": 0.0,
            "update_time": "1970-01-01T00:00:00+00:00",
            "last_match_mmr_change": 0.0,
            "abandons": 0,
            "season": 18,
            "top_rank_position": 0,
            "last_match_skill_mean_change": 0.0,
            "mmr": 2500.0,
            "previous_rank_mmr": 0.0,
            "last_match_result": 0,
            "wins": 0,
            "region": "euw",
            "losses": 0
        }
    }
}

Try to compare with your data.

steelx commented 4 years ago

@sidelux Im using ACCESS_TOKEN as received from SESSION ticket is that right ? In my headers Content-Type was missing, but still doesnt work. :\ if you have little time, can you watch me live on discord steelx#4050

sidelux commented 4 years ago

This is my request for access token: https://public-ubiservices.ubi.com/v3/profiles/sessions Header:

Content-Type:application/json
Ubi-AppId:39baebad-39e5-4552-8c25-2c9b919064e2
Authorization:Basic (EMAIL:PASSWORDBASE64)

Result:

{
    "platformType": "uplay",
    "ticket": "ACCESS_TOKEN",           <------- this is my token
    "twoFactorAuthenticationTicket": null,
    "profileId": "c3f8ab6a-db16-414e-9c24-bcaad74ee143",
    "userId": "c3f8ab6a-db16-414e-9c24-bcaad74ee143",
    "nameOnPlatform": "...",
    "environment": "Prod",
    "expiration": "2020-08-26T16:36:49.8243560Z",
    "spaceId": "632df4a5-4fd7-4ee5-a0c8-1f221f7e585f",
    "clientIp": "...",
    "clientIpCountry": "IT",
    "serverTime": "2020-08-26T13:36:49.8268334Z",
    "sessionId": "44336581-afe8-4199-bdf6-eea4c6e465cb",
    "sessionKey": "...",
    "rememberMeTicket": null
}

If you want to contact me on telegram my user is @fenix45.

steelx commented 4 years ago

@Seems2Legit @sidelux thanks guys. found the issue was Ubi-appid added correct one 39baebad-39e5-4552-8c25-2c9b919064e2