- You need access token to interact with PSN APIs. They can be obtained with a uuid and twoFA code. See HERE for detail how to get them
// import as a classconst PSN =const api =const uuid = 'uuid for login'const tfa = 'two step code for login'// return a promise contain access_token and refresh_token.const access_token refresh_token = await api;// access_token is used to call other APIs and refresh_token is used to get new access_token when it's expired.const tokenNew = await api;//use the accessToken to get user profileconst profile = await api;
// other useful api callsapi // find a named game from PSN storeapi // send a message to a PSN user(the target user must have a according privacy setting). content accept buffer of image file. max size is 1mbapi // get trophy summary of a given PSN user. offset starts from 0.api //get trophies by gameId.
- get user activity doesn not work for now