What's new

Web PHP Interface for PSN API

Tustin

Tustin

Keto Friendly!
Programmer Modder
Messages
197
Reaction score
237
Points
250
Sin$
7
You may have seen the post I made a few months back on here about my PSN lookup + API. I've been asked on a few different occasions if I could release the code, but to be honest it's pretty embarrassing. I decided to spend a bit more time and properly reverse Sony's private API that they use for their mobile apps. The repo is still a WIP, but I'm open to any ideas that anyone has for this. I plan on adding everything you can do within the mobile app + more. At the moment you can:
  • Login with your PSN credentials and retrieve your info
  • Message users
  • Get all your friends, their info, and friends of a friend
  • Get all your trophies and view the trophies for a specific game
  • Add or block people
  • Upload a profile picture to PSN (still a major WIP)
You can find the code on my GitHub here: [Click here to view this link].
Feel free to star/watch it if you're interested. If you have experience with reversing APIs and want to contribute, PM me on here and I can add you as a contributor!

Note: I have provided some minor documentation but it's going to take me a bit to explain how to use every function I included. Please bear with me as I finish the readme! :smile:


Thanks to JB for helping me add some things to this. :thumbsup:
 
Z61

Z61

Some times our saints are sinners
Retired
Programmer Forum Addict Odysseus' Summit
Messages
5,468
Reaction score
3,429
Points
1,042
Sin$
0
This looks very nice, if you get the chance you should try and make it a composer package.
 
Tustin

Tustin

Keto Friendly!
Programmer Modder
Messages
197
Reaction score
237
Points
250
Sin$
7
This looks very nice, if you get the chance you should try and make it a composer package.
Good idea! I'll probably set that up once I finish most of the things I'm wanting to add because I'm constantly making changes to it.
 
Z61

Z61

Some times our saints are sinners
Retired
Programmer Forum Addict Odysseus' Summit
Messages
5,468
Reaction score
3,429
Points
1,042
Sin$
0
Good idea! I'll probably set that up once I finish most of the things I'm wanting to add because I'm constantly making changes to it.
You can do it at any point and update it whenever you feel like. It won't force update the package without you doing it as far as I know.
 
C

crc32ok

Newbie
Messages
1
Reaction score
0
Points
35
Sin$
0
thx for sharing
how to get trophy data for a game? could you please give me a example?
 
WildeThing

WildeThing

Enthusiast
Messages
212
Reaction score
63
Points
130
Sin$
7
1) Your "autoloader" is not auto-loading anything. You need to use "spl_autoload" and maybe use a class prefix on your named include files. E.g. user.class.php
2) You're making a lot of cURL requests. If you implemented a method that takes args and works with cURL that way, rather than having lots of repeated code, you'd save time in your life.
3) Usually in APIs, the strings that you're writing to cURL are hardcoded as const members (not an issue, it's just convention).
4) The conventions you've used are reminiscent of .NET Pascal case conventions (ew).

Other than that, good job.
 
Mr Chip53

Mr Chip53

Enthusiast
Messages
582
Reaction score
200
Points
150
Sin$
0
Is this legal? Lol. Legit question though. I'm interested
 
Mr Chip53

Mr Chip53

Enthusiast
Messages
582
Reaction score
200
Points
150
Sin$
0
The whole reverse engineering a private API thing had me stumped lol
 
Tustin

Tustin

Keto Friendly!
Programmer Modder
Messages
197
Reaction score
237
Points
250
Sin$
7
Hopefully I don't get crucified for bumping this, but I've made some pretty big changes since I lasted posted on here.

The project is now setup in packagist, so you can pull it down with composer by doing "composer require tustin/psn-php". It also has proper autoloading using composer as well.

I also spent some time writing proper documentation for most things in the library. You can find that here: https://tustin.github.io/psn-php/ (or on the readme)

Lastly, I setup Travis CI to run build tests on the authentication part of the script for new commits/merged PRs. I'm not sure of a safe way to test the other scripts without using legit login credentials or tokens, so if you have any suggestions, feel free to post them here or open up an issue on the repo.

Should be a lot easier to setup and use now :smile:
 
Swerveio

Swerveio

XboxCore Studio
Messages
37
Reaction score
9
Points
90
Sin$
0
I keep getting this error,
Code:
{"error":"invalid_token","error_description":"Invalid token","error_code":4097,"docs":"https://auth.api.sonyentertainmentnetwork.com/docs/","parameters":["captchatokenmissing"]}

Also when I try and log in to, https://auth.api.sonyentertainmentnetwork.com/login.jsp, it doesn't show the captcha.

Z7L1Qea.png
 
Z61

Z61

Some times our saints are sinners
Retired
Programmer Forum Addict Odysseus' Summit
Messages
5,468
Reaction score
3,429
Points
1,042
Sin$
0

Similar threads

Top Bottom
Login
Register