danielwerg / r6api.js

🍫 Node.js wrapper around Rainbow Six Siege APIs
https://npm.im/r6api.js
MIT License
111 stars 19 forks source link

Get Ranking #49

Closed joshtan2 closed 3 years ago

joshtan2 commented 3 years ago

Hi I was playing around with your code but came across a problem with the rank url. I know that I am not using your wrapper but I was wanting to test your code. I was wondering if you could help me. I made a get request to the rank link which was 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=20&profile_ids=f67508fb-fd32-414e-8c8c-e1dff7b2eb92 with the following header:

'Ubi-AppId': '39baebad-39e5-4552-8c25-2c9b919064e2',
'Content-Type': 'application/json; charset=UTF-8',
'Authorization': `Ubi_v1 t=${TOKEN}`

but on postman it gave back a status: 401 error. When I tried it on python to see the response it said that errorCode': 4000, 'errorContext': 'UbiServices.Gateway', 'httpCode': 403, 'message': 'Client performing request from with header Ubi-AppId= is not authorized to access URL

I was wondering if you could help me. The Ubi-AppId is it something that everyone uses and I saw that you use the same one and you are able to get the rank of other players.

danielwerg commented 3 years ago

All I can see is what you are missing region_id. Couldn't reproduce same error.

I'm getting 200 with this url: 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=20&profile_ids=f67508fb-fd32-414e-8c8c-e1dff7b2eb92&region_id=emea and same headers as you have.

joshtan2 commented 3 years ago

ok. thank you so much. seems like I was just missing the region_id parameter.