[CustomAPI] Tom Clancy’s Rainbow Six Siege API (not official)

NOW WORKING, made a new version of it, the bellow instructions are still up-to-date

Hi everyone, im Rui Oliveira (aka Hacklason/Hackerino), a newbie developer.

I wrote this PHP “API” that gets player’s data with r6tab API, filters the data for human readable text and forwards the results to Nightbot.

This server-side script is making use of Nightbot’s dynamic response system (mostly $(urlfetch)) with which you are able to fetch the resources forwarded by my API.

This API will not save any data!

UPDATE: The source code is now public! (this is the V2) Click here to check out the repo


How to add commands to Nightbot

With chat:
!commands add !command_name command_response
or
!addcom !command_name command_response

With interface:
Check out nightbot’s interface.


Here’s what you need to add to a Nightbot command to get your R6 Rank (current season):

With name:
$(urlfetch https://ruioliveira.xyz/r6api/playerdata.php?p_name=YourR6NameHere&platform=YourPlatformHere&region=YourRegionHere&command=rank)

With id:
$(urlfetch https://ruioliveira.xyz/r6api/playerdata.php?p_id=YourR6IdHere&platform=YourPlatformHere&region=YourRegionHere&command=rank)

Full command example:
!commands add !r6rank $(urlfetch https://ruioliveira.xyz/r6api/playerdata.php?p_name=YourR6NameHere&platform=YourPlatformHere&region=YourRegionHere&command=rank)

Output Example:
Region: EU | Rank: Gold IV | MMR: 2686 | Platform: UPLAY, Updated 21 hours ago, more info in https://r6tab.com/fbd7856f-2210-46a8-ae49-286aff3f2849

Output preview in twitch:

rankoutput

  • Adjust the URL parameters to fit your purposes.

  • ?platform= (xbox, ps4 or uplay.)
    xbox for Xbox One,
    ps4 for PS4,
    uplay for PC.

  • &region= (eu, na, as)
    eu for Europe,
    na for America,
    as for Asia.

  • &p_name=(Your nick on the specific platform)
    or
    &p_id=(Your player ID on the specific platform)

  • Specify a command after the &command= query parameter at the end of the URL in the $(urlfetch) method.
    rank for rank and mmr info,
    stats for level, win rate and K/D (Ranked),
    time for total playtime (Casual + Ranked).


Example of the commands outputs:

rank

Input example:
$(urlfetch https://ruioliveira.xyz/r6api/playerdata.php?p_name=Hacklason&platform=uplay&region=eu&command=rank)

Output Example:
Region: EU | Rank: Gold IV | MMR: 2686 | Platform: UPLAY, Updated 21 hours ago, more info in https://r6tab.com/fbd7856f-2210-46a8-ae49-286aff3f2849

Output preview in twitch:

Check image above

stats

Input example:
$(urlfetch https://ruioliveira.xyz/r6api/playerdata.php?p_name=Hacklason&platform=uplay&region=eu&command=stats)

Output Example:
Lv. 174 | 51.43% Win Rate | 1.06 K/D

Output preview in twitch:

Click Here

time

Input example:
$(urlfetch https://ruioliveira.xyz/r6api/playerdata.php?p_name=Hacklason&platform=uplay&region=eu&command=time)

Output Example:
510 hours, 13 minutes and 35 seconds

Output preview in twitch:

Click Here


Want any new feature? Contact me in discord: Hackerino#0001

5 Likes

UPDATE: Now working with the new ranks.

1 Like

have any github link to your php code?

1 Like

Hi rehkloos,

I made the repo of this project public, but i can’t link it here due to my Nightbot’s account limitations.

Please hit me up on Discord and i will give you the link for it.: Hackerino#0001

Nevermind, seems like my user restrictions are no more :slight_smile:

Here’s the link to the repo: https://github.com/HackerinoS2/Rainbow-6-Siege-Player-Data-API

UPDATED: Fixed error when using the player ID (remember that when you use the player id, you still need to insert the region).

Hello,
I’m trying to use this API but for some reason it keeps saying “no player found”, this is the command I’m trying to use:

!commands add !rank $(urlfetch https://ruioliveira.xyz/r6api/playerdata.php?p_name=Nirah.&platform=uplay&region=na&command=rank)

I’ve tried this command with different users and still it says “no player found”.
Hope I can get some help.

Hi venpin!

First of all, sorry for the late reply!

Seems like the API is broken! The R6TAB API was updated.

I will fix it, but can’t tell you when exactly.

Thanks for your understanding.

Hi again venpin! This API is working again! I hope it will be helpful to you.

Update: This API is working again. If you find any bugs, please reply this topic.

Thank you so much for the help! I tried it out and it is working perfectly! lots of love <3

1 Like

I realized that the mmr doesn’t match the rank of the person, for example a person with 2029 mmr should be bronze 1 but it shows that they’re bronze 3… Edit: I think the updated command doesn’t take into account the update to the mmr bracket of ranks

Hi again, i have confirmed this insue and seems like something is not right with the r6api (the core API that im using to get all of this data). But if you get your data with the player ID it should be fine.

I will also work on a temporary fix.

I’ve implemented a temporary fix for the ranks, you can check it out now.

If you find any more bugs just tell me :smiley:

i’m trying to use this API but for some reason, the url from r6tab arent the same of the player id (show only the home page). This is the command im trying to use:

($(urlfetch htps://ruioliveira.xyz/r6api/playerdata.php?p_name=iNeFFex-l&platform=ps4&region=na&command=rank))

hope i can get some help soon

Hi, you missed a “t” in the url: ($(urlfetch https://ruioliveira.xyz/r6api/playerdata.php?p_name=iNeFFex-l&platform=ps4&region=na&command=rank))

i take the "t"cause i cant put the link here

I recommend you to find your user id, go to r6tab and try to find yourself there, then copy the id that is in the url. And instead of using your player name in my API, use the player id.

Getting data by player name is not precise because there can be players with similar names.

Hi again igortomassi!

Did you get that to work as you wanted?

Hello,
The command seemed to be working perfectly for a couple of days but now whenever I try to use it, the output is: “This player’s data could not be found”. I tried it with multiple different people that I know for sure have an account but it still has the same output…