tejado / pgoapi

Pokemon Go API lib
Other
1.4k stars 445 forks source link

Get other player's profile #80

Closed colinfwren closed 8 years ago

colinfwren commented 8 years ago

I've built a simple Trainer Card web app here: https://pokemon-go-trainer-card.herokuapp.com/

Sauce here: https://github.com/Gimpneek/pokemon-go-trainer-card

I'm getting loads of negative feedback about the need to login to generate the card (people worrying about the app stealing credenitals etc).

Is it possible with the API to grab a player without logging in as that player? So for instance if I were login in as Player A would I be able to then get details for Player B?

I know in the app we're able to see the name of players who have placed lures on pokestops and on the gym screen we can see player avatars for those who have pokemon at the gym.

ztukaz commented 8 years ago

I think it's related to gym info, not player info. So maybe you can't get by name, but by gyms. But moving toward world gym you risk a ban because of the strange movement of the player...

colinfwren commented 8 years ago

Sorry for the delay, I was on holiday so was unable to respond. Looking at https://github.com/AeonLucid/POGOProtos/blob/master/src/POGOProtos/Networking/Requests/Messages/GetPlayerProfileMessage.proto I should be able to send over the name of the player I want to get data on.

However when I do the following: api.get_player(player_name="foo").call() it always returns the currently logged in players information.

Would this be an issue of the .proto file having the wrong mapping or the way that pgoapi is handling the mapping the call the POGOProtos.Networking.Requests.Messages.GetPlayerProfileMessage? The log shows it's calling the RPC call with arguments

INFO:__main__:Adding 'GET_PLAYER_PROFILE' to RPC request including arguments

tejado commented 8 years ago

try:

api.get_player_profile(player_name = "foo").call()
earthchie commented 8 years ago

wanna know too.

get_player_profile works but in my case I want to access thier inventory.

Can I use: https://developers.google.com/api-client-library/javascript/features/authentication Then set the session token to the api?

tejado commented 8 years ago

As far as I know, it isn't possible to retrieve the inventory of another player.

Don't know if this is possible with the js lib from google.

elliottcarlson commented 8 years ago

It should be possible to use that library to retrieve a JWT that is usable in the API auth, it provides the added benefit of not receiving the users credentials. The authentication routine would need to be modified to allow passing in a pre-authorized JWT though.

On Jul 28, 2016 9:46 AM, "tjado" notifications@github.com wrote:

As far as I know, it isn't possible to retrieve the inventory of another player.

Don't know if this is possible with the js lib from google.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tejado/pgoapi/issues/80#issuecomment-235898942, or mute the thread https://github.com/notifications/unsubscribe-auth/AANYSBGtDl2ZpCCokTGiof58Iy6A9_Hhks5qaLK5gaJpZM4JSqic .

tejado commented 8 years ago

I assume that the posted JS library doesnt support this kind of login to google. Please have a look to https://github.com/simon-weber/gpsoauth

pogoman3 commented 8 years ago

get_player_profile works but in my case I want to access thier inventory

@earthchie Were you able to use get_player_profile to view another player's badges and start time? If so, mind please sharing what proto fields you used in the request? In my experience it will only show you your own badges.

earthchie commented 8 years ago

Edit: Oh. you're right. I tried to change player name to my secondary account and it still return exact same info.

it always returns the currently logged in players information.