gta5-map / Social-Club-API-cheat-sheet

Basically a guide that explains how to parse Rockstar's Social Club to obtain a specific piece of information using it's internal JSON endpoints.
http://rockstar-api.rtfd.io
Do What The F*ck You Want To Public License
74 stars 7 forks source link

Crew hierarchy endpoint not working #2

Closed r3m4k3 closed 8 years ago

r3m4k3 commented 8 years ago

Hi there,

I have provlem with getting data about my crew. I have such curl command:

curl -v -XGET -H "Content-type: application/json" 'http://pl.socialclub.rockstargames.com/crewapi/[CREW_NAME]/hierarchy/10/false?_=141977749113' -L --insecure

Curl is still trying to connect to the IP address (trying 192.81.241.19) and then I got connection timed out error.

In my browser link http://pl.socialclub.rockstargames.com/crewapi/[CREW_NAME]/hierarchy/10/false?_=141977749113 is working correctly, it returns me asked data.

Why is that? Has something changed in the API structure?

Thanks, best regards

frdmn commented 8 years ago

Rockstar implemented a bunch of mean HTTP header checks to avoid requests sent by non-browsers like cURL. You need to sent exactly the same headers as your browser does, see this comment: https://github.com/gta5-map/Social-Club-API-cheat-sheet/issues/1#issuecomment-153733540