3

In my app i'm trying to show the profile image of a user that i know the userid of. I'm using the

socialize.getUserInfo

REST endpoint to do so, but it constantly returns my user data. I understand that through Gigya's iOS SDK i do not need to explicitly provide the UID to get my user info, but since i'm trying to get another user's data i need Gigya to use the provided UID and i did not find any ways to force it.

Is there a way to do this?

Thanks in advance.

Zoltan Varadi
  • 2,468
  • 2
  • 34
  • 51

1 Answers1

2

This isn't possible using the Gigya iOS SDK (or any client-side SDK) because it poses a security risk. Any REST API call which is made from a client-based security context only has access to data which is relevant to the currently logged in user session. Therefore, it isn't possible to query the database for other users or make service-based calls to the REST API from the iOS SDK (and similar environments).

Instead, you would need to access the REST endpoint directly or use a server-side SDK which uses your partner secret key or a signed request in order to make such a query to the database.

JayReardon
  • 809
  • 1
  • 10
  • 22
  • Thanks! We ended up creating a "proxy request" where the app calls our server that calls gigya. This is basically what you referred as "server-side SDK" solution, am i correct? – Zoltan Varadi Aug 18 '15 at 08:05
  • Yes, that's exactly what we were talking about. Glad to hear you found a solution! – JayReardon Aug 18 '15 at 20:41