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

Asked Sep 4, 2019·30 replies·Last activity 2 years ago·Open in Discord ↗
Archived from the original community forum
Things may have changed since it was written. Still stuck? Ask the community on Discord.

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:

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:
* Adjust the URL parameters to fit your purposes.
* ?platform= *(xbox, ps4 or uplay.)*
**xbox** for Xbox One,

30 replies

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:

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](https://imgur.com/FZ3CN3O)
**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](https://imgur.com/Y8qcDUZ)
Want any new feature? Contact me in discord: Hackerino#0001
rankoutput.png

UPDATE: Now working with the new ranks.

have any github link to your php code?

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

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

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.png

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

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

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...

Hi, im sorry for the late reply (didn't seen the email update due to the bunch of emails i get every day 😃 )

Now to use the R6Tab API (the base API that i use in this project) needs a API key.

I have already requested this same key to the R6Tab team.

Sorry for the inconvenience

EDIT: For this same reason you cannot get any data from my API at the moment.

smiley.png

Hi again! The API is working fine now 😃

smiley.png

Hello!
I can see that it is working again, thanks for the help! But the rank is currently showing the wrong rank once again. Sorry to disappoint lol. I appreciate everything you do to get this command to work! :)

slight_smile.png

Hey I’m using $(touser) for the commands and the only one that worked is the rank, time and stats only show “ Couldn't find any player with the inserted ID” any fix for that?

@Hasty Crab Heya, use $(1) instead of $(touser) and also double check the player name.

!addcom -cd=5 !COMMAND_NAME $(urlfetch https://ruioliveira.xyz/r6api/playerdata.php?p_name=$(1)&platform=ps4&region=na&command=rank)

Hope it would work

Hello, I'm trying to use this command. But with the rank it doesn't show anything. With the stats, it only shows the correct lvl en the time does work.

Hi everyone, sorry for not replying for a while, i get so much trash emails that i dont even se the notification emails :P Seems like the API i rely on is not working atm (R6TAB API), so this API is not working as well.

I will try to notice you guys if the situation changes.

Hello i would like some help it keeps on saying (Error Connecting To Remote Server)
This is my code is there anything wrong with it
($(urlfetch htps://ruioliveira.xyz/r6api/playerdata.php?p_name=Sniper_serson-l&platform=ps4&region=na&command=rank))

Hey, i need help setting the command up 😃

Didn't find your answer? The community is on Discord.

Ask on Discord