PSN API
Home Downloads Discussions Issue Tracker Source Code Documentation

PSN API 1.0
  Examples

PSNID
  Properties
string ID User Id
string AvatarSmall URL Small Avatar
string AvatarMedium URL Medium Avatar
string Avatar URL Large Avatar (not available for all avatars)
string AboutMe (not available)
int Level User Level
int Progress User Total Progress
TrophyCount TrophyCount TrophyCount Structure
List<Game> Games List of Games
Status Status Status Structure
DateTime? LastSeen (not available)
DateTime? LastCheck (not available)
bool Plus (not available)

Error
  Properties
int Number Error Number
string Description Error Description

Status
  Properties
bool Online User is online
bool Away User is away
string Comment User comment in PSN
string Playing Game the user is playing

TrophyCount
  Properties
int Total Total number of Trophies
int Platinum Number of Platinum Trophies
int Gold Number of Gold Trophies
int Silver Number of Silver Trophies
int Bronze Number of Bronze Trophies

Game
  Properties
string Id Game Identifier
string Title Game Title
string Image URL Game Image
int Progress User progress on this Game
int OrderPlayed Order of the Game (Same as Sony Site)
TrophyCount TrophyCount TrophyCount Structure
List<Trophy> Trophies List of Trophies of the Game

Trophy
  Properties
int? IdTrophy Trophy Identifier
string GameId Game Identifier
string Title Trophy Title
string Description Trophy Description
string Image URL Trophy Image
DeateTime? DateEarned Date when the trophy was earned
string TrophyType Type of Trophy (BRONZE, SILVER, GOLD, PLATINUM)
bool Hidden Trophy Hidden

KeyManager
  Methods
string GetCurrentKey () Get Key needed for registration

PSNServices
  Constructors
void PSNServices Initializes a new instance of PSNServices
void PSNServices (string SecurityKey) Initializes a new instance of PSNServices with a License Key
  Methods
bool SetIdentity (string sEmail, string sPassword) Set the main account for all querys
void SetIdentityAsync (string sEmail, string sPassword) Set the main account for all querys (Async Call)
bool LogUser (string sEmail, string sPassword, out string sPSNId, out CookieContainer cookies) Log in a specific account and get User Id and cookies needed for next calls
void LogUser (string sEmail, string sPassword) Log in a specific account (Async Call)
PSNID GetPSNId (string sPSNId) Get Profile of user sPSNId
PSNID GetPSNId (string sPSNId, CookieContainer cookies) Get Profile of user sPSNId using a specific account
void GetPSNIdAsync (string sPSNId) Get Profile of user sPSNId (Async Call)
void GetPSNIdAsync (string sPSNId, CookieContainer cookies) Get Profile of user sPSNId using a specific account (Async Call)
List<Game> GetGames (string sPSNId) Get Games from user sPSNId
List<Game> GetGames (string sPSNId, CookieContainer cookies) Get Games from user sPSNId using a specific account
void GetGamesAsync (string sPSNId) Get Games from user sPSNId (Async Call)
void GetGamesAsync (string sPSNId, CookieContainer cookies) Get Games from user sPSNId using a specific account (Async Call)
List<Trophy> GetTrophies (string sPSNId, string sGameId) Get Trophies from user sPSNId and game sGameId
List<Trophy> GetTrophies (string sPSNId, string sGameId, CookieContainer cookies) Get Trophies from user sPSNId and game sGameId using a specific account
void GetTrophiesAsync (string sPSNId, string sGameId) Get Trophies from user sPSNId and game sGameId (Async Call)
void GetTrophiesAsync (string sPSNId, string sGameId, CookieContainer cookies) Get Trophies from user sPSNId and game sGameId using a specific account (Async Call)
List<PSNID> GetFriends () Get List of Friends of the account defined with SetIdentity
List<PSNID> GetFriends(string sPSNId, CookieContainer cookies) Get List of Friends of User sPSNId
void GetFriendsAsync () Get List of Friends of the account defined with SetIdentity (Async Call)
void GetFriendsAsync (string sPSNId, CookieContainer cookies) Get List of Friends of User sPSNId (Async Call)
PSNID GetFriend (string sFriend) Get Profile of Friend sFriend of the account defined with SetIdentity
PSNID GetFriend (string sPSNId, string sFriend, CookieContainer cookies) Get Profile of Friend sFriend of User sPSNId
void GetFriendAsync (string sFriend) Get Profile of Friend sFriend of the account defined with SetIdentity (Async Call)
void GetFriendAsync (string sPSNId, string sFriend, CookieContainer cookies) Get Profile of Friend sFriend of User sPSNId (Async Call)
List<PSNID> GetFriendsWithStatus () Get List of Friends & Profiles of the account defined with SetIdentity
List<PSNID> GetFriendsWithStatus (string sPSNId, CookieContainer cookies) Get List of Friends & Profiles of User sPSNId
void GetFriendsWithStatusAsync () Get List of Friends & Profiles of the account defined with SetIdentity (Async Call)
void GetFriendsWithStatusAsync (string sPSNId, CookieContainer cookies) Get List of Friends & Profiles of User sPSNId (Async Call)
List<Game> GetListOfGames () Get List of all Games using PSNAPI WebServices
void GetListOfGamesAsync () Get List of all Games using PSNAPI WebServices (Async Call)
List<Game> GetListOfGames (string sGameId) Get Game sGameId using PSNAPI WebServices
void GetListOfGamesAsync (string sGameId) Get Game sGameId using PSNAPI WebServices (Async Call)
List<Trophy> GetListOfTrophies (string sGameId) Get List of Trophies of game sGameId using PSNAPI WebServices
void GetListOfTrophiesAsync (string sGameId) Get List of Trophies of game sGameId using PSNAPI WebServices (Async Call)
bool isNewVersionAvailable () Return TRUE if there is a new version of the API available
  Events
void SetIdentityCompleted (bool bResult) Occurs when an asynchronous SetIdentityAsync operation completes.
PSNID LogUserCompleted (string sPSNId, CookieContainer cookies) Occurs when an asynchronous LogUserAsync operation for User sPSNId completes.
PSNID GetCachedPSNId (string sPSNId) Occurs when calling GetPSNId. You can provide your cached Data
List<Game> GetCachedGames (string sPSNId) Occurs when calling GetGames. You can provide your cached Data
List<Trophy> GetCachedTrophies (string sPSNId, string sGameId) Occurs when calling GetTrophies. You can provide your cached Data
List<Trophy> GetOriginalTrophies (string sGameId) Occurs when calling GetTrophies. You must provide the complete list of trophies
List<PSNID> GetCachedFriends (string sPSNId) Occurs when calling GetFriends. You can provide your cached Data
PSNID GetCachedFriend (string sPSNId, string sFriendId) Occurs when calling GetFriend. You can provide your cached Data
CookieContainer GetCookies () Occurs when calling SetIdentity. You can provide you own CookieContainer
void GetPSNIdCompleted (PSNID id) Occurs when an asynchronous GetPSNId operation completes
void GetGamesCompleted (string sPSNId, List<Game> games) Occurs when an asynchronous GetGames operation for User sPSNId completes
void GetTrophiesCompleted (string sPSNId, string sGameId, List<Trophy> trophies) Occurs when an asynchronous GetTrophies operation for User sPSNId and Game sGameId completes
void GetFriendsCompleted (string sPSNId List<PSNID> friends) Occurs when an asynchronous GetFriends operation for User sPSNId completes
void GetFriendCompleted (string sPSNId, PSNID friend) Occurs when an asynchronous GetFriend operation for User sPSNId completes
void GetListOfGamesCompleted (string sPSNId, List<Game> games) Occurs when an asynchronous GetListOfGames operation completes. sPSNID is null
void GetListOfTrophiesCompleted (string sPSNId, string sGameId, List<Trophy> trophies) Occurs when an asynchronous GetListOfTrophies operation for Game sGameId completes. sPSNID is null
  Properties
string Identity User Id
CookieContainer cookies Cookies used to query information
Error Error Error Structure