Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello, here is what I am trying to do:

I want to get a token called "X-CSRF-TOKEN" from the following URL: "http://www.roblox.com/home" using Roblox.XsrfToken.setToken('') I am guessing I would need to parse the website to get it, I tried
JavaScript
 var token = Roblox.XsrfToken.setToken('') 
token.href = "http://www.roblox.com/My/GroupAdmin.aspx"


I am not sure if I am going the right way with that, however once I have the token I need to make a POST to "http://www.roblox.com/groups/api/change-member-rank"

JavaScript
$.ajax({
      type: "POST",
      url: "http://www.roblox.com/groups/api/change-member-rank"
      data: {
          X-CSRF-TOKEN: [The token]
          X-Requested-With: XMLHttpRequest

            }
});
?
with the variables groupId, newRoleSetId, and targetUserId and pass the "X-CSRF-TOKEN" from what we just got above, along with "X-Requested-With: XMLHttpRequest" to the url /My/GroupAdmin.aspx I put above. I think I also need to pass a cookie with this?

What I am trying to do here is create an automated system that promotes users of this website in a group or clan, and I know this is possible as I have seen multiple others do it, however they did not seem to want to tell me how to do it, and the information I gave you is what I have been figuring out myself.

When I make the POST the legitimate way, this is the information that is returned:
VB
POST /groups/api/change-member-rank?groupId=1190045&newRoleSetId=7835958&targetUserId=563473 HTTP/1.1
Host: www.roblox.com
Connection: keep-alive
Content-Length: 0
Accept: */*
Origin: http://www.roblox.com
X-CSRF-TOKEN: pJLkcw7TXHlV
X-Requested-With: XMLHttpRequest


If you have anymore questions, please ask.
Posted
Updated 5-Nov-14 14:40pm
v2
Comments
Sinisa Hajnal 6-Nov-14 2:30am    
"When I make the POST the legitimate way" - are you implying that what you're doing is NOT legitimate?
POC0taco 6-Nov-14 13:13pm    
What I mean by that, is when I do this the manual way, on the site. What I am trying to do is off site, which is not against the terms and conditions of using the site I am trying to do this on.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900